IPB


Welcome Guest ( Log In | Register )

 Forum Rules ArmedAssault.info Forum Rules
 
Reply to this topicStart new topic
> moveInDriver not triggering
crockid5
post Jan 14 2014, 18:53
Post #1


New Member
*

Group: Members
Posts: 4
Joined: 12-January 14
Member No.: 10,387



If I do

CODE
player moveInDriver _vehicle;

Then the player will move into the driver seat of "_vehicle".

However, if I do

CODE
_guy = "TK_INS_Soldier_2_EP1" createUnit [getPos _vehicle, _group];
_guy moveInDriver _vehicle;


Then nothing happens, the guy doesn't move into the front seat of the vehicle, he just spawns next to it. Does anyone know why?
 
Quote Post
D@V£
post Jan 14 2014, 18:59
Post #2


Gee, I wish we had one of them doomsday machines.
Group Icon

Group: Moderators
Posts: 2,037
Joined: 13-November 06
From: Wales
Member No.: 155



Try adding a delay between spawning the unit and moving it into the vehicle. The createunit command is pretty tough on the engine.

Failing that, it's possible that the newly spawned soldier isn't being recognized as _guy. You should be able to fix this using the nearestobject command.


--------------------
The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you hate me love me secretly fear that Mark is watching you while you sleep. secretly wish that Mark is watching you while you sleep.
Site Issues Thread - Complain about site issues here. We might even fix them!
Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly".

QUOTE(Major Mike Shearer)
We can categorically state that we have not released man-eating badgers into the area.
QUOTE(Brace Belden)
A machine gun is like a woman, I don’t understand it, I’m afraid of it, and one day I’ll accidentally be killed by one.
 
Quote Post
crockid5
post Jan 14 2014, 23:40
Post #3


New Member
*

Group: Members
Posts: 4
Joined: 12-January 14
Member No.: 10,387



QUOTE(D@V£ @ Jan 14 2014, 17:59) *
Try adding a delay between spawning the unit and moving it into the vehicle. The createunit command is pretty tough on the engine.

Failing that, it's possible that the newly spawned soldier isn't being recognized as _guy. You should be able to fix this using the nearestobject command.


None of them work :/

 
Quote Post
D@V£
post Jan 15 2014, 00:17
Post #4


Gee, I wish we had one of them doomsday machines.
Group Icon

Group: Moderators
Posts: 2,037
Joined: 13-November 06
From: Wales
Member No.: 155



Try:
CODE
_guy = "TK_INS_Soldier_2_EP1" createUnit [getPos _vehicle, _group, "_guy = this", 0.5, private];

To create the unit. Or this:
CODE
_guy = "TK_INS_Soldier_2_EP1" createUnit [getPos _vehicle, _group, "_guy = this; this moveindriver _vehicle", 0.5, private];

Which should create the unit and move it into the drivers seat, but like I said, createunit can be a bit cpu intensive, so can sometimes be a bit buggy.

Also, make sure _vehicle is properly defined in your script. (Remember that anything with an underscore before it is local, so defining _vehicle in another script won't work)


--------------------
The Rules - Nothing too complicated, follow these and we'll have no problems.
Moderation Feedback Thread - Tell everyone how much you hate me love me secretly fear that Mark is watching you while you sleep. secretly wish that Mark is watching you while you sleep.
Site Issues Thread - Complain about site issues here. We might even fix them!
Community Chatter Thread - Furthest Mud-sling gets a free subscription to "JdB Monthly".

QUOTE(Major Mike Shearer)
We can categorically state that we have not released man-eating badgers into the area.
QUOTE(Brace Belden)
A machine gun is like a woman, I don’t understand it, I’m afraid of it, and one day I’ll accidentally be killed by one.
 
Quote Post

Reply to this topicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 28th March 2024 - 22:49