Jump to content
Sign in to follow this  
Virevert

Question about spawning a vehicule

Recommended Posts

Hi,

This line in a trigger work perfecly, but the gun direction is south when it appears and the ennemy is coming from north...not good

_ammo = "PRACS_Type74AAgun" createVehicle (getMarkerPos "m7401");

I tried the setdir command in the trigger, but no luck...

Rotating the marker show no result also

Is there a way to fix the problem?

Thanks in advance

Share this post


Link to post
Share on other sites

Try this

_spawn = [getmarkerpos "spawn1", "BMP3", "sp1a",180] execVM "mission1a.sqf";

sp1a is just to give the vehicle a name so can be called by other scripts. The direction is the 180, change this to what ever degrees you want 0 would be north.

the execVM "mission1a.sqf part is a script to call the crew etc

Share this post


Link to post
Share on other sites
[...] the execVM "mission1a.sqf part is a script to call the crew etc

Okay, now I'm confused here. Is this a file which is already present somewhere or does this file needs to be scripted by the OP first?

If it's the latter, why don't you show how to write that instead of showing how to execVM it :D

I mean no offense buddy, but you didn't contribute to solve his problem in any way but helped to move the problem into another layer :(

I'm really sorry though if "mission1a.sqf" is something like an insider info and I'm too stupid to recognize xD

Btw after using setDir you should use the setPos-commands to synchronize the new direction to all clients.

Maybe this will help you?

Share this post


Link to post
Share on other sites

Tanks to both of you for the reply

I am a 62 years old man and scripting is like Chinese for me....

I should mention in my message "script is not a option for me"

I will try the setPos command

Tanks

Share this post


Link to post
Share on other sites

_ammo = "PRACS_Type74AAgun" createVehicle (getMarkerPos "m7401");

although you can create ob object with the name _ammo you cant really use it in the editor.

using marker direction to set the vehicle

ammo1 = "PRACS_Type74AAgun" createVehicle (getMarkerPos "m7401");
ammo1 setdir getmarkerdire  "m7401";
ammo1 setpos getpos ammo1;

alternate using actual degrees

ammo1 setdir 180;

Share this post


Link to post
Share on other sites

Tanks again F2K Sel

Your code is working. My machine gun is now facing the ennemy...

Fantastic

Tanks to you and to the other guy who took time to post a reply

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×