Home   Help Search Login Register  

Author Topic: teleport flag pole  (Read 1271 times)

0 Members and 1 Guest are viewing this topic.

websnake

  • Guest
teleport flag pole
« on: 02 Oct 2005, 00:03:34 »
I dont no if this will work but i want to make a c+h but different to most others.

I want to make it so every 5mins or so the flag teleports somewhere else so the teams will have to go capture it again and it will also stop camping little gits. Also if for example if west has captured the flag and it teleports, the flag will go back to neutral.

Would this be posible? and if so can someone share it with me please


ROBINO

  • Guest
Re:teleport flag pole
« Reply #1 on: 02 Oct 2005, 00:53:16 »
try something like this:

you need 10 gamlogics named log0 to log9
1 gamelogic called server
1 flagpole called flagname
call this script from init.sqs or from a trigger
you want only 1 instance of this script running cos setpos effects all machines

Code: [Select]

?!(local server): exit

_rand = 0


#mainloop
~300
_rand = random 10
?(_rand == 0): flagname setpos (getpos log0)
?(_rand == 1): flagname setpos (getpos log1)
?(_rand == 2): flagname setpos (getpos log2)
?(_rand == 3): flagname setpos (getpos log3)
?(_rand == 4): flagname setpos (getpos log4)
?(_rand == 5): flagname setpos (getpos log5)
?(_rand == 6): flagname setpos (getpos log6)
?(_rand == 7): flagname setpos (getpos log7)
?(_rand == 8) flagname setpos (getpos log8)
?(_rand == 9: flagname setpos (getpos log9)
goto "mainloop"



this should move the flag around every 5 minutes - thats IF the flag texture follows the flagpole around -  you may need to refresh it using:


Code: [Select]

flagname setflagtexture "sometexture.jpg"



as to how you get capture and hold scripts working properly i dunno
« Last Edit: 02 Oct 2005, 00:53:56 by ROBINO »

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:teleport flag pole
« Reply #2 on: 02 Oct 2005, 01:17:48 »
Few remarks:

-_rand = 0 // no need to declare

-_rand = random 10 will give u something like 7.256
Use _rand = (random 10 - (random 10 mod 1))

-Gamelogics are big flags in the editor,hard to position.
Better use markers,U can set them to empty when game starts,use getmarkerpos instead of getpos.

-U also have to setpos the triggers around the flags ;)

http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)

wi77ard

  • Guest
Re:teleport flag pole
« Reply #3 on: 03 Oct 2005, 02:03:11 »
good to see you and robino getting a nice mission working, will be great for inter-clan matches. B sqn is going to loose!