| 08-03-2006, 09:15 AM | #1 |
An integer variable, which is altered automatically and periodically via triggers going below 0? And also how would I make it so for every 30 seconds or so that the integer is at 0, the player's units lose a set amount of health? Thnx |
| 08-03-2006, 10:08 AM | #2 |
1) Why, 'think it easy, just add a "{Your Integer} Is Greater Than Or Equal To 0" condition the the "automatically and periodically running" trigger. Hope I didn't misunderstand you ;-) 2) Use the event "Time - Periodical Event" and condition "{Your Integer} Equal to 0", if I'm not wrong |
| 08-03-2006, 10:48 AM | #3 |
Thnx, but I dont see that working because there are several factors that effect how much the integer is decreased by every period, so it could go from say 40, down by 30 to 10, and then next time, it would still be above 0, so will still subtract 30 or more, and from then on it will just keep going into negative figures if U see what I mean :D But thnx anyways, is there not like a gameplay constant I can change or something?. I also have another query now, lol. If I use the event "Player - Player types chat message (String((Random integer number between 10 and 1000000))) as and exact match" will the event response trigger "Integer(Entered Chat string)" recognise whatever number was entered within those boundary numbers, or will it have generated a random number between the two values and waited for a player to enter it? That probably sounds a lot more complicated than it is, but I have a knack for doing that, lol :D |
| 08-03-2006, 11:20 AM | #4 | ||
Quote:
---------------- Event:Periodical/Condition:NONE Actions: Set intTemp = ThatInteger - howmuchyouwanttosubstract if(intTemp<0)Then(Trun this trigger off)Else(Set ThatInteger=intTemp) ---------------- Quote:
|
| 08-03-2006, 11:43 AM | #5 |
OK thnx, so how would I enable the player to type any number and get the triggers to recognise what has been entered and set a variable to the number? |
| 08-03-2006, 02:13 PM | #6 |
Tell the player to enter a number beginning with "-", and use the event "Player - Types chat message containing '-' as a substring". In the actions write "Set {integer} = Str2Int(Substring(StrTyped,2,LengthOf(StrTyped)))" (I wrote them in a simplified way, hope you understand) |
| 08-03-2006, 02:30 PM | #7 |
No lol, sry, could U do like a trigger tag for that? :D OK, nvm, would this work? Sry, I dunno how to do trigger tags? Set TradeAmount[1] = (Integer((Substring((Entered chat string), 2, (Length of (Entered chat string)))))) |
| 08-03-2006, 02:37 PM | #8 |
