OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: faguss on 11 Jun 2008, 10:25:46

Title: Dummy animation controls action on vehicle
Post by: faguss on 11 Jun 2008, 10:25:46
Problem is that action doesn't work when I'm on vehicle. I click, disembark and then option is changed.
It works perfectly when I'm not in vehicle.
Tried to change position with "pos driver" or "actionarea". No changes.

Update: You can download that addon from my website. Stuff-->Speeder_add
Title: Re: Dummy animation controls action on vehicle
Post by: Gnat on 17 Jun 2008, 06:04:00
Hmmm .... your not explaining your problem very well. What is meant to happen, what is not happening?
I dont see "actionarea" in any LOD
I see no Useractions etc in the Config

Are you talking about User Actions?
Are you talking about Driver animation position ?
Title: Re: Dummy animation controls action on vehicle
Post by: faguss on 17 Jun 2008, 22:40:09
>What is meant to happen,
Commit action.

>what is not happening?
Actions are not working.

>I dont see "actionarea" in any LOD
I don't understand. I'm not into modelling things.

>I see no Useractions etc in the Config
That's impossible. Everything in it's right place.

>Are you talking about User Actions?
Yes.
Title: Re: Dummy animation controls action on vehicle
Post by: Planck on 17 Jun 2008, 23:58:31
Seems to me you have closed your class Speeder_add before adding your UserActions.

Code: [Select]
class Speeder_add: Motorcycle
{
......
......
class STABILI
{
type = "rotation";
animPeriod = 0.02;
selection = "autolock";
axis = "osa_autolock";
angle0 = 0;
angle1 = 1;
};
};   <-----class Speeder_add closed here

class UserActions
{

class GEAR1
......
......
Title: Re: Dummy animation controls action on vehicle
Post by: faguss on 18 Jun 2008, 16:16:09
No. I'm closing class_animations using this bracket.
Title: Re: Dummy animation controls action on vehicle
Post by: Planck on 18 Jun 2008, 16:45:45
aye, apologies, I was fooled by them being aligned tab-wise in the config.

Will teach me to drink whilst reading configs.

Ok, your cfgModels will be wrong anyway as it should use the modelname and not the classname.
According to your cfgVehicles section the model is called 'speeder' so cfgModels should be:

Code: [Select]
class CfgModels
{
class default {};
class Vehicle: default {};
class Car: Vehicle {};
class Speeder: Car {};
};

Another slight tweak I noticed would be carmouflage=1;, which should be camoflage=1; ... I hope
And I haven't been drinking so far today.

As for the User Animations ... do you have named selections for the animation classes in the model?
I don't have O2 available on this machine to check myself.


EDIT: OK I checked the p3d in a text editor and searched for:

lockon, autolock, osa_lockon, osa_autolock and pos driver.
All were found ok.

However why you are using pos driver is beyond me, pos driver is a point in the lods that marks the position for the driver to board the vehicle.

I really need to get my main machine up and running again   ::)


Planck
Title: Re: Dummy animation controls action on vehicle
Post by: faguss on 18 Jun 2008, 17:59:47
Because this is addon modification I copied config from original addon.
So in cfgModels I set
   class Speeder_add: Car {};

camouflage fixed and set to 3.

>All were found ok.
I copied that from other addon.

>However why you are using pos driver
Give me a better idea. I'm not an addonmaker.
Title: Re: Dummy animation controls action on vehicle
Post by: Planck on 18 Jun 2008, 18:34:40
Quote
So in cfgModels I set
   class Speeder_add: Car {};

Did you also then change the name of the p3d file to Speeder_add.p3d?

and the model = line in the cfgVehicles section to:

model="\Speeder_add\Speeder_add";

The classname used in cfgModels should be the same as the p3d model name, without the p3d extension.

I'll see what I can dig up regarding the User Actions bit, I have to keep reminding myself this is for OFP and not ArmA.   :whistle:


EDIT:, well I can't really do much more here till I get my main machine and O2 working again, hopefully someone else can help you further!



Planck
Title: Re: Dummy animation controls action on vehicle
Post by: Gnat on 19 Jun 2008, 05:15:26
I seem to have found a different download off your page, where is your current version ?
Title: Re: Dummy animation controls action on vehicle
Post by: faguss on 19 Jun 2008, 09:00:41
>should be the same
But don't have to. Anyway I renamed that file to indicate difference from the original p3d.


>where is your current version ?
Is this really so complicated?
(http://www.euro-net.pl/~faguss/img/untitled.PNG)

UPDATE: actions are working irregularly so I treat is as not working.
Title: Re: Dummy animation controls action on vehicle
Post by: Gnat on 20 Jun 2008, 10:52:33
Is this really so complicated?
...... you were asking for help. Stay civil

Looking at your model;

(1) In action definition GEAR1 and GEAR2 you are trying to trigger animation "GEAR"
   First problem is that the Access Point ("pos driver") does not exist in the "VIEW - PILOT" LOD, therefore you may not get the action available to the pilot
   Add another named point in the PILOT-VIEW and Memory right beside where the pilots head would be, name it, and then use that name in "position="xxxxxxxx";"

(2) Same problem as (1), except for this time with action definition STABILION and STABILIOFF

Also I note animation definition dont actually do anything on the model, they simply act as "On-Off" switches for some scripts.
Title: Re: Dummy animation controls action on vehicle
Post by: faguss on 24 Jun 2008, 15:20:57
>Add another named point...
I copied points from the other addon. Placed them and changed "position".
No changes.

>does not exist
"Pilot" and "pos driver" exists. I copied them to memory and then changed position value to "pos driver" and "pilot".
No changes.

>dont actually do anything
As topic name.

Newest:
http://www.euro-net.pl/~faguss/files/speeder_add.rar
Title: Re: Dummy animation controls action on vehicle
Post by: Gnat on 25 Jun 2008, 12:47:34
Ok, this is getting harder.

In UserActions try deleting the "alive this  &&" and "&& getpos this select 2<2"
and whereever you have "==0" change to "< 0.1"

Just to be sure no other conditions are interfering
Title: Re: Dummy animation controls action on vehicle
Post by: faguss on 28 Jun 2008, 10:40:26
No change.
I have a question. Have you ever launched that addon ?
Title: Re: Dummy animation controls action on vehicle
Post by: Gnat on 28 Jun 2008, 18:25:55
If by launched you mean "run in OFP", the answer is no.

Lets get a summary again please.
- It works (you can get Action menu items) with a player standing beside the speeder, yes?
- But you DONT get Action menu items when the player is the Driver of the unit, correct?

Not making sence this poblem
- Resort to removing all Conditions for testing and say;
Quote
condition = "this animationphase ""STABILI"" > 0.1";
and similar (< 0.9 etc) for all other Actions. (drop the != and ==)
- Increase the RADIUS to 20
- make sure there is at least 1 named point in EVERY LOD called "attack" about near the driver.

If it STILL doesn't work ..................... stuffed if I know.


Title: Re: Dummy animation controls action on vehicle
Post by: faguss on 03 Jul 2008, 22:54:10
Solved by Pulverizer.
Title: Re: Dummy animation controls action on vehicle
Post by: Gnat on 04 Jul 2008, 01:53:44
What was the problem?
Title: Re: Dummy animation controls action on vehicle
Post by: faguss on 04 Jul 2008, 11:19:21
He said that animations are "too unpredictable & buggy", replaced it with variables and made scripts launch locally.
Title: Re: Dummy animation controls action on vehicle
Post by: Gnat on 04 Jul 2008, 15:28:00
"too unpredictable & buggy".
hmmmm .... odd statement. Worked for hundreds of addons, including my own.

Just another thought (as to why yours is different to 100's others) if you wanted to persist.
Instead of animating just a couple of points in the LOD, place a tiny cube inside of the main body and animate that. Maybe it doesn't like animating just points, maybe it needs faces.
If the axis is beside the cude then no one will ever see it.