hello, i dont understand for loops, could someone pls help me, i just need the compass to point to a different obj(depending on situation) for each player in the game..
while loops for for as long as the argument they have is true, so do for loops.
for(
[statement declaration]
local.i = 0;
[what variable to use and what value to use it at start]
local.i < 1;
[as long as this is true...]
local.i++)
[change the variable so it's not an infinite loop]
no, local.i is just a variable. it starts at 0, (local.i = 0;) the statement here (local.i < 1;) makes the loop stop when the variable reaches that stage in time, and this (local.i++) adds one to the variable each time the loop goes through. you can make it local.i-- as well to make it subract one.
i dont know the best way to use a for loop in an MP map, never had the inclination to try to script for MP.
i think my problem lies in the fact that the command.... set_objective_pos sets the objective position for everyone, maybe its used in single player i dont know...
but with that loop its trying to set the objective in 2 positions at the same time therefore renderign the compass very confused
sorry i keep forgetting things differ between the 2, im actually runnin the game in BT, n that thread ty but it appears to be for "everyone" not for individual people
Well the commands are used in BT as well.
BT in my opinion is the best as it is backward compatible with SH and AA.
It sometimes has no problems with AA only maps and scripts whereas SH will. If you use the same method as shown in that thread for your script in BT it will work fine.