moveInDriver not triggering |
moveInDriver not triggering |
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? |
|
|
Jan 14 2014, 18:59
Post
#2
|
|
Gee, I wish we had one of them doomsday machines. 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 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. |
|
|
Jan 14 2014, 23:40
Post
#3
|
|
New Member Group: Members Posts: 4 Joined: 12-January 14 Member No.: 10,387 |
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 :/ |
|
|
Jan 15 2014, 00:17
Post
#4
|
|
Gee, I wish we had one of them doomsday machines. 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 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. |
|
|
Lo-Fi Version | Time is now: 23rd April 2024 - 07:42 |