Jump to content
Sign in to follow this  
mynameisme

Checking if something is true in a script.

Recommended Posts

Just trying to get into scripting but hit a wall, probably a small one :rolleyes:

in a trigger i have

truckend=true

and in my script:

sheep4 attachTo [truck,[0,-1,-0.7]];  sheep4 setDir 140
sheep3 attachTo [truck,[0.1,0.1,-0.7]];  sheep3 setDir 305
sheep2 attachTo [truck,[0.1,-0.5,-0.7]];  sheep2 setDir 35
sheep1 attachTo [truck,[-0.2,-2.2,-0.7]];  sheep1 setDir 200
player attachTo [truck,[-0,-1,-0.7]]; player setdir 180

#loop
player playmove "AmovPpneMstpSnonWnonDnon"
goto "loop"

#playerdetach
detach player;
_worldPos = truck modelToWorld [0,-6,0];
player setPos [_worldPos select 0, _worldPos select 1, 0];

exit

i want it to check if truckend=true or not, if it is go to "player detach", if it isnt goto loop...

i though it might be something like

if ?truckend then goto "end" else goto "loop"

or some such :confused:

thanks

Edited by mynameisme

Share this post


Link to post
Share on other sites
Ah thanks got it sorted, looks like i was way off :rolleyes:[/QUOTe]

Not a problem.

Share this post


Link to post
Share on other sites
It's 2009, use SQF. :)

I would, if I could actually understand it. I've tried to learn through Mr. Murray's manual, and only have the sparse basics.

It is still very difficult for me to grasp. have a suggestions for tutorials?

Share this post


Link to post
Share on other sites

When I learned, I did a really simple step by step approach.

Like, instead of having my first mission have every bell and whistle ever I started really small, no scripts at all. Then add in one little script for say.. spawning a new unit when I hit a trigger. Or using briefings instead of waypoints. Then just keep adding in features and learning new things as I went along.

The other thing to try is finding easy SQS scripts and trying to rewrite them in SQF.

Share this post


Link to post
Share on other sites
The other thing to try is finding easy SQS scripts and trying to rewrite them in SQF.

Nice idea, I imagine that is good practice.

Share this post


Link to post
Share on other sites
Nice idea, I imagine that is good practice.

That's what I did while waiting for ArmA (1). Although I was already slighlty familiar with SQF syntax, it really is good practice.

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  

×