Fangie
Member-
Content Count
5 -
Joined
-
Last visited
-
Medals
Community Reputation
0 NeutralAbout Fangie
-
Rank
Rookie
-
Very simple question...
Fangie replied to -~1ncognito~-'s topic in OFP : MISSION EDITING & SCRIPTING
Use the Exit command. #Loop Dostuff if (value = true) : goto "end" goto "Loop" #end Exit Maybe you can say exit right away instead of goto "end", but i need to test that. -
I'm building a weapon training mission, where those nice Target-E objects are in. These wooden targets go down when their damage is 1. It's going to be a multiplayer mission for an upcoming LAN, so more players are shooting at the targets. Of course you're supposed to shoot your own target, but with ranges up to 500 meters, it's gonna be quite hard to make up if the target is in your lane or not. Also, multiple players could be in the same lane, so even if they are shooting the right target, they could be in doubt who has hit it. So what i need is a command/script what sees who has shot the target, or what target he has just shot. I've tried checking it with directions, but the players direction (Getdir) is not nescerry the scopes direction, so the scope has a "loose" direction of about 10 degrees. So this was useless. I hope someone can help me with one of these problems. And it should be possible to check who you shot, because the scoring system works that way too.
-
Thanks bn880, that's just what i'm looking for, still, it would be interesting, if you could check if a unit is busy doing something or check wether he is in some kind of modus.
-
I'm quite new to scripting and stuff, but you don't have a 20 second limit to shells. You could create your first shell, and after 20 seconds, you copy speed, direction and position into variables, and then you create a new shell, with the same speed, direction and position. You could repeat this, so you can make a trajectory over 2 minutes. I'm not sure this will work, it's just an idea.
-
I want to make a multiplayer mission that has only real players on your team, so no AI players. I could not find a command which checks wether a unit is player or AI controlled, so I've come up with an idea. I tell in the script to stop the unit, and then i check wether the unit is on stopped modus. I think this only works on AI, so I can flush the real players from the AI, and then I delete the AI units. One problem: the script can't check if a unit is in stopped modus. Here I'll show you the script I've made. unitdel = "AI unit deleted" man2 stop true ? (man2 stop) : (me groupchat unitdel) Exit me is the player unit, i'm currently commanding, of course in multiplayer, this unit would be playable. man2 is the current AI test unit. I use unitdel to check wether the script does his job. I hope someone can help me, other ideas on checking wether a unit is AI or player are welcome, nevertheless, it would be interesting to know how to check these sort of commands, because man2 disableAI "move" didn't work either.