Jump to content
Sign in to follow this  
denco

Waypoint Statement [executing a script]

Recommended Posts

I'm trying to run a script trough waypoint statement but my game crashes when the unit reaches its position and runs the script.

[b]_ewp1 setWaypointstatements ["true", "_handle = [egrp3,h1] execVM ""Eject.sqf"","];[/b]

And I also tried this

[b]_ewp1 setWaypointstatements ["true", "_handle = [(egrp3),(h1)] execVM ""Eject.sqf"","];[/b]

The eject script

[b]_group = _this select 0;
_vehicle = _this select 1;

sleep 1;

{
unassignvehicle _x;
_x action ["EJECT", _vehicle];
sleep 0.5;
} foreach units _group;[/b]

I've also tried changing the script and the same thing happens, when the unit reaches its position the game crashes.

[b]_ewp1 setWaypointstatements ["true", "_handle = [] execVM ""Eject.sqf"","];[/b]

Eject script

[b]unassignVehicle Para_leader;
Para_leader action ["Eject", h1];[/b]

I firmly believe that the issue lies with me running the script wrong, but I have no idea how to fix and I need some help.

Share this post


Link to post
Share on other sites

I'm not much of a scripter, but it looks like you have too many quotation marks, especially around ""Eject.sqf""

Share this post


Link to post
Share on other sites
I'm not much of a scripter, but it looks like you have too many quotation marks, especially around ""Eject.sqf""

I think they have to be since they are inside the quotation marks themself. I could have also done them like this

[b]_ewp1 setWaypointstatements ["true", "_handle = [] execVM 'Eject.sqf',"];[/b]

Where ' stand for double quotation.

Share this post


Link to post
Share on other sites
_ewp1 setWaypointstatements ["true", "_handle = [egrp3,h1] execVM ""Eject.sqf""[color="#FF0000"],[/color]"];

You have a comma there that should either be a ; or remove it.

Share this post


Link to post
Share on other sites
_ewp1 setWaypointstatements ["true", "_handle = [egrp3,h1] execVM ""Eject.sqf""[color="#FF0000"],[/color]"];

You have a comma there that should either be a ; or remove it.

One knows he has enough of scripting for a day when he overlooks something as small as this

Thanks Larrow.

Share this post


Link to post
Share on other sites
I'd also bin your eject script if your ejecting from a Helo.

See here for a full working example.

Simple-ParaDrop-Script

That script is very good and I will surely hold it for future use. But for this mission I want that the enemy Paratroopers are seen when they jump out of the Helli ( and I've already supplied everyone with their chutes) . Thanks for sharing it with all of us :)

Share this post


Link to post
Share on other sites
_ewp1 setWaypointstatements ["true", "_handle = [egrp3,h1] execVM ""Eject.sqf""[color="#FF0000"],[/color]"];

You have a comma there that should either be a ; or remove it.

I have a script working through unit 'init' field with command: []exec "xxxx.sqs". But when unit gets in the vehicle it doesn't execute the script. I put the same line in the waypoint 'On Act' field: []exec "xxxx.sqs". But nothing. What I do wrong?

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  

×