| 07-01-2004, 04:15 AM | #1 |
Code:
Decrease Food
Events
Time - Every 20.00 seconds of game time
Conditions
StarvingBoolean Equal to False
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FoodCount Greater than 0
Then - Actions
Set FoodCount = (FoodCount - 1)
Else - Actions
Multiboard - Set the color for Multiboard item in column 3, row 1 to (100.00%, 0.00%, 0.00%) with 0.00% transparency
Game - Display to Player Group - Player 1 (Red) the text: You are starving! F...
Set StarvingBoolean = True
Trigger - Run Starving <gen> (checking conditions)Code:
Starving
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
StarvingBoolean Equal to True
FoodCount Equal to 0
Then - Actions
Unit - Set life of You to ((Life of You) - 1.00)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
StarvingBoolean Equal to True
Then - Actions
Unit - Set life of You to ((Life of You) - 1.00)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FoodCount Equal to 0
Then - Actions
Unit - Set life of You to ((Life of You) - 1.00)
Else - Actions
Set StarvingBoolean = False
Multiboard - Set the color for Multiboard item in column 3, row 1 to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Game - Display to (All players) the text: You are no longer s...Whats wrong with this? I just can't seem to get the Starving part right! I'v tried atleast 17 times to fix it, but all in vain. >_> |
| 07-01-2004, 04:27 AM | #2 |
K, have it just turn on starving and have a trigger to turn starving off. As far as i can see you tell it to run starving, which goes off every second and if it doesn't happen to be that special split second when you have Trigger - Run Starving <gen> (checking conditions) nothing gets set off. |
| 07-01-2004, 10:29 AM | #3 |
Maybe you should replace Trigger - Run Starving <gen> with Trigger - turn on Starving <gen> (i'm guessing you want to activate a previously deactivated trigger when the food runs out) And the "Starving" trigger looks really really wierd to me. What exactly do you want it to do? |
| 07-01-2004, 06:54 PM | #4 | |
Quote:
Heh, it's weird because it's a RPG with a food system. You run out of food, you die. I have a multiboard that displays the amount of food you have (its using numbers, as if how full your character is). Also, I did what both of you suggested, and it works! Thanks! |
| 07-01-2004, 08:31 PM | #5 | |
Quote:
Yeah, no problem, but still, all the if-then-else stuff in that trigger... It seems.. I don't know, it can be done simpler. From what I've been able to analyize, the whole trigger would have the same effect if it looked like this: Code:
Starving
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - multiple conditions
Conditions:
StarvingBoolean Equal to True
FoodCount Equal to 0
Then - Actions
Unit - Set life of You to ((Life of You) - 1.00)
Else - Actions
Set StarvingBoolean = False
Multiboard - Set the color for Multiboard item in column 3, row 1 to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Game - Display to (All players) the text: You are no longer s... Also, seting the boolean to false in the "Else-actions" is redundant, because that boolean must be false for those actions to run anyway. What is missing under the "else-actions", though, is the action "trigger - turn off (this trigger)", because when you're no longer starving, you don't need this trigger to keep running. |
