Home   Help Search Login Register  

Author Topic: repeating a script...  (Read 2237 times)

0 Members and 3 Guests are viewing this topic.

mrsarkey

  • Guest
repeating a script...
« on: 01 Jul 2006, 19:06:13 »
Well, I have this CTf map and all the players start without a weapon. Instead I have placed the weapons on the ground using the gunsontables script I found on OFP.info. The problem at the moment tho is that when a player picks up a gun it is not replaced with a new one. So after a couple of rounds there will be no guns left! How can I get this script to run on every new round. (I am using the setup for "Real_Paintball" so when u die u spectate until that round is over).
Thanks

Offline Seven

  • Members
  • *
  • Am I a llama?
Re: repeating a script...
« Reply #1 on: 01 Jul 2006, 20:23:59 »
How do you call the script for the table to be armed?
I guess you could do it with a repeating trigger every 5 or 10 minutes (300 or 600 seconds)
in the activation field [mytable] exec "weaponscript.sqs"

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: repeating a script...
« Reply #2 on: 01 Jul 2006, 20:31:02 »
It would be helpful to know how you define when a round ends and a new round begins.

However, you might use scripting or use triggers to let a new round start. And there's the place to add the call for your weaponscript.

If you could give some more info about how you manage your rounds, we would be capable to tell you wheres the best place is for it  ;D

Offline supershooter

  • Members
  • *
  • 2+2=4
Re: repeating a script...
« Reply #3 on: 01 Jul 2006, 20:35:26 »
Hi

I have attached the script I am using so you might be able to help a bit better.

Presuming you have seen the script, I call a weapon by putting the correct code into the init line of a Game Logic Object.

SO how do I repeat this for every new round?

(*NOTE, I am Tim, but there have been various account issues*)

[attachment deleted by admin]

Offline supershooter

  • Members
  • *
  • 2+2=4
Re: repeating a script...
« Reply #4 on: 01 Jul 2006, 20:38:25 »
Well, one of the bog standard MP Missions for OFP is Real Paintball (CTF/TDM) on desert island. The game starts:

Voiceover: 3
                 2
                1
          Go go go

Then you play until everybody is dead or a flag is captured.
Once one of these two events has happened a new round starts like:

Voiceover: 3
                 2
                1
          Go go go

And so on. Is that clear :P?

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: repeating a script...
« Reply #5 on: 01 Jul 2006, 23:08:39 »
probably everyone knows the paintball map. sadly i don't have the whole mission scripting in mind.
As i say, there somewhere a trigger or a script which detects if all players dead or flag is captured to start the new round.
At least it has to execute the countdown voiceover script.

It would be more helpful if you upload the whole mission or at least the script which controls the gameflow.

A shot from the hips: try to find this voiceover script or trigger and add there the call for your script.

Offline Seven

  • Members
  • *
  • Am I a llama?
Re: repeating a script...
« Reply #6 on: 02 Jul 2006, 04:50:28 »
I would name all 13 gamelogics and have 13 repeating  triggers each 5 minutes on the map like:

[logic47,"AK47","AK47",0] exec "table.sqs";

[logicRPG,"rpglauncher","rpglauncher",0] exec "table.sqs";

....

but then again I'm no scripting wonder :)

Offline supershooter

  • Members
  • *
  • 2+2=4
Re: repeating a script...
« Reply #7 on: 02 Jul 2006, 10:20:45 »
I''ll go have another look at the map. First I'll try mykes idea, but I really like Sevens idea of putting some triggers in.

Offline Seven

  • Members
  • *
  • Am I a llama?
Re: repeating a script...
« Reply #8 on: 03 Jul 2006, 17:10:39 »
Ehm I might want to correct myself;
have an extra little script with all this in it after you named the game logics
Code: [Select]
[logic47,"AK47","AK47",0] exec "table.sqs";

[logicRPG,"rpglauncher","rpglauncher",0] exec "table.sqs";

etc...

and then have only one repeating trigger instead of 13; I believe that would be better for cpu
execute it in the activation of the trigger like this
Code: [Select]
[] exec "thisscript.sqs"

Offline supershooter

  • Members
  • *
  • 2+2=4
Re: repeating a script...
« Reply #9 on: 10 Jul 2006, 22:32:38 »
Makes sense.  ;D

-supershooter

*SOLVED*
*SOLVED*
*SOLVED*
*SOLVED*