Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: "Error" Message when not enough minerals.
"Error" Message when not enough minerals.
Sep 19 2009, 9:20 am
By: Drakiel  

Sep 19 2009, 9:20 am Drakiel Post #1



Help! What am I doing wrong. It worked before it's just not consistant, it kind of works, but I dunno what's wrong with it. I'm sure it's something to do with how I have my "Deaths timer" set.

There's an "INN" If you have the money, you get healed, minerals is taken away.
If you don't, do nothing, and display a sound/error txt message.
Here's the code:

FOR HEALING:
---------------------
Trigger("Player 7"){
Conditions:
Deaths("Player 4", "Protoss Reaver", At most, 0);
Bring("Player 1", "Infested Kerrigan (Infested Terran)", "Healing - Terran", At least, 1);
Accumulate("Player 1", At least, 20, ore);
Bring("Player 5", "Terran Science Facility", "Healing - Terran", At least, 1);

Actions:
Modify Unit Hit Points("Player 1", "Infested Kerrigan (Infested Terran)", 100, 0, "Healing - Terran");
Modify Unit Energy("Player 1", "Infested Kerrigan (Infested Terran)", 100, 0, "Healing - Terran");
Run AI Script At Location("ReHe", "Healing - Terran");
Set Resources("Player 1", Subtract, 20, ore);
Play WAV("sound\\Bullet\\pTrFir00.wav", 1497);
Set Deaths("Player 4", "Protoss Reaver", Set To, 400);
Preserve Trigger();
Comment("P1 Healing - Terran");
}


FOR ERROR:
-----------------------
Trigger("Force 1"){
Conditions:
Deaths("Player 4", "Protoss Reaver", At most, 0);
Bring("Player 1", "Infested Kerrigan (Infested Terran)", "Healing - Terran", At least, 1);
Accumulate("Player 1", At most, 19, ore);
Bring("Player 5", "Terran Science Facility", "Healing - Terran", At least, 1);

Actions:
Play WAV("sound\\Protoss\\Advisor\\PAdErr00.WAV", 1872);
Display Text Message(Always Display, "\x016You have not enough \x00eminerals \x016to \x007heal\x016. \x016You're required \x00620 \x00eminerals\x016.");
Set Deaths("Player 4", "Protoss Reaver", Set To, 400);
Preserve Trigger();
Comment("P1 Healing - Terran -MinERROR");
}


Continous "internal" Countdown timer
(to prevent re-heals or wasted-money)
-------------------------------------------------------
Trigger("Force 1"){
Conditions:
Always();

Actions:
Set Deaths("Player 4", "Protoss Reaver", Subtract, 1);
Set Deaths("Player 5", "Protoss Reaver", Subtract, 1);
Set Deaths("Player 6", "Protoss Reaver", Subtract, 1);
Preserve Trigger();
Comment("Healing - Continuous CountDown");
}



None.

Sep 19 2009, 1:27 pm Arol Post #2



Uh sorry, but i dont understand what's your Problem. The Triggers are fine.

This
Play WAV("sound\\Bullet\\pTrFir00.wav", 1497);
you wont hear cause it only Plays for the Current Player.
If these triggers are used to be in a Multiplayer Map, u might notify several Problems and somethings will act different depending on the Player Amount.



None.

Sep 19 2009, 1:32 pm lil-Inferno Post #3

Just here for the pie

I would try replacing "Player 1" with "Current Player". Having triggers like that always seemed to mess with me, so I just use "Current Player". Other than that, I really didn't notice anything abnormal with it except for the fact that you run an AI script every time the player heals. Why did you do that?




Sep 19 2009, 1:38 pm Arol Post #4



ReHe is just Recall here - probably to creat a graphical "healing effect"

However if he actually changes P1 to current Player, the Healing trigger would stop working cause its owned by P7. Using player 1 works fine.



None.

Sep 19 2009, 2:16 pm lil-Inferno Post #5

Just here for the pie

Ah, I see. I really don't use text triggers so I wouldn't know. Perhaps if you post the map I may be able to find the problem?




Sep 19 2009, 2:53 pm rockz Post #6

ᴄʜᴇᴇsᴇ ɪᴛ!

If you don't know what's wrong with it, we can't help you. How do you know it's wrong?



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Sep 19 2009, 4:03 pm Commanda_Panda Post #7



If you post the map I'm quite sure I will be able to fix the triggers, and explain why they were not working. As is, you haven't explained very well what isn't working I don't think :/



None.

Sep 19 2009, 4:26 pm CecilSunkure Post #8



Just by reading the first couple sentences of your map, I can tell it is a problem with the condition of the trigger that is playing the error message. Either the condition itself is messed up, or another trigger is messed up causing the condition of the trigger playing the message to fire (e.g. setting a switch to fire the message error).



None.

Sep 19 2009, 4:30 pm Drakiel Post #9



Here's my map. It's amateur at best, and I hate "publisizing" unprotected and unfinished maps, but whatever, we're here to help and it's "out-there" that this is my map.

The trigger works, but for some reason it pauses.
Like.... If I just stand on the healing spot, you heal.... and you don't get an error message until you walk off, wait a while, then walk back on. BUT Even then it doesn't always work. I dunno the triggers look fine to me too, but.... any help would be appreciated. Thanks!

EDIT:
If testing, the only triggers finished is the FAR LEFT (terran side) Science Vessel beacon, which is where you heal for 20minerals.

Attachments:
Heroes Fall -Test-Balance.scx
Hits: 4 Size: 102.28kb

Post has been edited 1 time(s), last time on Sep 19 2009, 4:39 pm by Drakiel.



None.

Sep 19 2009, 4:34 pm Kaias Post #10



Firstly, Why is the first trigger owned by Player 7? Any display messages or wavs (as is the case in this trigger) only run for the owner of the trigger. Because it is Player 1 stepping on the location, I'm guessing that's who you want it to play for.

Secondly, how many players are in Force 1? because all the players are specified specifically the run for all the players in the force and would detect the same thing. Fortunately it shouldn't be a problem in this case because you have the cooldown death counter, however, because Force 1 owns that trigger as well it will go down faster depending on how many people are in Force 1.

Edit: I just looked at the map, Player 1 will recieve the error message for all 3 human players in Force 1. This is because having Force 1 as the trigger owner is the same as being owned by Player 1 2 and 3 (the people in it) individually. Since Player 1's trigger run first it'll subtract the minerals and display the message for him if it applies for Player 2 and 3.

Post has been edited 3 time(s), last time on Sep 19 2009, 4:45 pm by Kaias.



None.

Sep 19 2009, 4:43 pm Drakiel Post #11



So if I just use all of those triggers for P1, P2, P3 respectively in THEIR trigger conditions, then it should work fine? (instead of Force 1, seperate them into P1, P2, P3)?

(P7, a neutral computer player, has the arbiters, that's why the healing is done within the Player 7 conditions).

Quote from Kaias
Firstly, Why is the first trigger owned by Player 7? Any display messages or wavs (as is the case in this trigger) only run for the owner of the trigger. Because it is Player 1 stepping on the location, I'm guessing that's who you want it to play for.

Secondly, how many players are in Force 1? because all the players are specified specifically the run for all the players in the force and would detect the same thing. Fortunately it shouldn't be a problem in this case because you have the cooldown death counter, however, because Force 1 owns that trigger as well it will go down faster depending on how many people are in Force 1.

Edit: I just looked at the map, Player 1 will recieve the error message for all 3 human players in Force 1. This is because having Force 1 as the trigger owner is the same as being owned by Player 1 2 and 3 (the people in it) individually. Since Player 1's trigger run first it'll subtract the minerals and display the message for him if it applies for Player 2 and 3.




None.

Sep 19 2009, 4:45 pm Kaias Post #12



What you should do is have a trigger for Force 1 subtracting 1 deaths for Current Player Protoss reavers if Current Player has at least 1 deaths of Protoss Reavers.

Then for your heal trigger, you only need one Trigger (the one you have) except in the place of Player 1 2 3 just have it be Current Player and set the deaths of Protoss Reavers to 400 for Current player, rather than Player 4

The heal wav won't play for the Players because it is in Player 7's trigger.



None.

Sep 19 2009, 4:48 pm Drakiel Post #13



WOO HOO It worked, thanks Kaias, I'll make some changes accordingly.
Thank you so much!
(I love SEN, a VERY active community with very intelligent members)
Thanks for your replies, gentlemen.

EDIT:
Player 1, 2 ,3 deaths of reavers WOULD simplify things, I'll change that. Thanks again.

Post has been edited 1 time(s), last time on Sep 19 2009, 4:59 pm by Drakiel.



None.

Sep 19 2009, 4:52 pm Commanda_Panda Post #14



I'm glad you got your problem solved. I was just about to post pretty much what Kaias said =)
One thing you can do, if you want to keep the recall effect when players heal is, move the triggers to players 1,2 and 3 (of course) and add an extra action to the trigger to add 1 death count of some arbitrary death (let's say goliath for example)

Then make triggers for player 7:
Conditions:
Player 1 has suffered 1 death of Goliath

Actions:
Set player 1 deaths to 0 for goliath
Recall at player 1 heal location
Preserve trigger

And the same for Players 2 and 3.



None.

Sep 19 2009, 5:40 pm Kaias Post #15



Quote from Commanda_Panda
I'm glad you got your problem solved. I was just about to post pretty much what Kaias said =)
One thing you can do, if you want to keep the recall effect when players heal is, move the triggers to players 1,2 and 3 (of course) and add an extra action to the trigger to add 1 death count of some arbitrary death (let's say goliath for example)

Then make triggers for player 7:
Conditions:
Player 1 has suffered 1 death of Goliath

Actions:
Set player 1 deaths to 0 for goliath
Recall at player 1 heal location
Preserve trigger

And the same for Players 2 and 3.
Actually, all he would need to do is change it from Player 7 to Force 1, set all the Player 1 2 and 3's to Current Player and instead of running the AI script set a switch. Then for Player 7 if that switch is set then run the AI script and clear the switch. Player 1 2 and 3 certainly don't need their own death counter for it or a specific recall orders (if you look at his trigger it heals at the location you bring the unit to, not at a player location)



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:18 pm]
Ultraviolet -- 🔪🐈
[12:34 pm]
NudeRaider -- curiosity kills the cat!
[06:18 am]
Sylph-Of-Space -- No complaints here, i'm just curious!
[2024-5-18. : 11:05 pm]
Ultraviolet -- :wob:
[2024-5-18. : 3:55 pm]
Zoan -- :wob:
[2024-5-18. : 10:34 am]
NudeRaider -- SEN doesn't rely on spammers initiate its sleep cycle. It hat fully automated rest and clean-up phases. Please understand that this is necessary for the smooth operation of the site. Thank you.
[2024-5-18. : 3:45 am]
Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
[2024-5-17. : 6:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[2024-5-17. : 5:41 am]
Ultraviolet -- 🤔 so inf is in you?
[2024-5-17. : 4:57 am]
O)FaRTy1billion[MM] -- my name is mud
Please log in to shout.


Members Online: Roy, Ultraviolet