Home   Help Search Login Register  

Author Topic: Need help quick!  (Read 642 times)

0 Members and 1 Guest are viewing this topic.

Offline Lykurgos

  • Members
  • *
  • Member of Decapitator
    • My ftp site (contains few mission etc...)
Need help quick!
« on: 11 Apr 2003, 18:54:23 »
Sorry to interrupt you again, but I am making a mp mission for tomorrow evening and I received some problems.

Case n.1
Must be asked hundreds of times, but how to remove actions?

Case n.2
I made rain script. One of the players controls the weather and this script is trying to make a rain:

#Raini
hint "Rain commenced"
playsound "Thundr3"
0 setOvercast 20
leadere removeaction ["Rain","Raino.sqs"]
leadere addaction ["End rain","End rain.sqs"]
~22
? (RainEnd==1) : goto "Raini"

0 setOvercast 0
Hint "Rain ended"
~2
leadere addaction ["Rain","Raino.sqs"]

exit

It works except for 2 things:
-the removeaction doesnÂ't work.
-It goes through the list of commands, but only once, I tried to make a loop, so it circles alltime until the RainEnd has value 1.

Case n.3
Very similar to the rain script, except this one must circle forever.

#Changa
~400
hint "Time will change in 3"
~1
hint "Time will change in 2"
~1
hint "Time will change in 1"
~1
skiptime 12
hint "Time changed"
goto "Changa"

Same problem; it only does it once, it doesnÂ't circle.

Any help will be appreciated.  :)
(Sorry to post this into a wrong area...)
You are right of course, to go alone would be crazy. You will be my driver.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Need help quick!
« Reply #1 on: 11 Apr 2003, 19:02:30 »
@ 1: PlayerName removeaction ActionName
@ 2: See # 1.
@ 3: I dunno what is the problem on that one. :-\
« Last Edit: 11 Apr 2003, 19:04:41 by The real Armstrong »

Kaliyuga

  • Guest
Re:Need help quick!
« Reply #2 on: 11 Apr 2003, 19:04:55 »
  well as far as the removing action goes:

To add an action you should use this:

Code: [Select]
actionid=unit addaction["actiontext","actionscript"]


and to remove it you should use this:

Code: [Select]
unit removeaction actionid
action id is the the name assigned to the action using the addaction command.

You do not need to assign an id to your action, but it is a useful way of      
remembering what each one is!
 
 You can also remove the first action you created using:

 
Code: [Select]
unit removeaction 0
the second by changing the 0 to a 1 etc...

As far as the scripting stuff  I'm sure someone else more knowledgable in those matters will come along and help you out with it ;)

Also I noticed that in your "weather script" you omitted the

setrain command

which version of OFP are you using?  cause setrain works pretty well. if you have a current enough version to support it ;)


Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Need help quick!
« Reply #3 on: 11 Apr 2003, 19:45:03 »
3.  If the script is exiting after one correct loop, then there is something wrong with the loop.  (Obviously.)    Try deleting the loop label and command and replacing them.   Use a name that makes it easy to spot a mistake, like "A".

If that doesn't work, it might be a bizarre effect with the skiptime command.   Try deleting that and see if the loop works.

Sorry I can't be more helpful.
Plenty of reviewed ArmA missions for you to play

Offline Lykurgos

  • Members
  • *
  • Member of Decapitator
    • My ftp site (contains few mission etc...)
Re:Need help quick!
« Reply #4 on: 11 Apr 2003, 20:41:00 »
I have resistance, but I am using OFP 1.46 in this mission, because my friends donÂ't have resistance.

Okay, the removeaction is working. But the loop doesnÂ't work.

Thanks anyway, althought I can make some short rains and a skiptime for several times, but not loop. Could be the only solution.
You are right of course, to go alone would be crazy. You will be my driver.