Trigger Help
Jul 27 2010, 4:40 am
By: Striker  

Jul 27 2010, 4:40 am Striker Post #1



Okay well I need some help with a trigger for resetting levels on a micro map I'm making.

Well need help making for when a player doesn't beat the level that the level reset and they can try again

Attachments:
PvZ Micro.scm
Hits: 0 Size: 42.59kb

Post has been edited 1 time(s), last time on Jul 27 2010, 5:23 am by Striker.



None.

Jul 27 2010, 4:45 am ImagoDeo Post #2



If you don't 1) Post the map, 2) post the triggers, or 3) explain what the problem is, nobody here can help you.



None.

Jul 27 2010, 9:58 am NudeRaider Post #3

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

First of all I have to ask you to change your topic title to something that reflects your actual problem a little better. Almost everyone who comes here needs help with triggers and the forum rules say "topic names shall have descriptive names". Otherwise I'm forced to close the topic.

A "reset" can't be done automatically. You have to do whatever is necessary for it manually using the appropriate trigger actions.

Here's where death counters (dcs) really shine. I'm using the dc 'start' to signify when a level starts: dc count = level number and during the fight I add 100 (assuming you don't have 100 or more levels). The cool thing about the way I set it up is you only need 1 trigger for "victory" and "reset level" and of course 1 trigger per level ("Start Level x") that cleans the battlefield and creates the units for the respective level.

Trigger
Players
  • Player 8 (Computer)
  • Conditions
  • Current Player has suffered exactly 1 death of 'start'
  • Actions
  • Remove all [men] for All Players
  • Create units for Force 1 (Humans)
  • Create units for Current Player
  • Add 100 to dc 'start'
  • Preserve


  • Trigger
    Players
  • Player 8
  • Conditions
  • Current Player brings at most 0 [men] to 'Arena'
  • Current Player has suffered at least 100 deaths of 'start'
  • Actions
  • Subtract 99 deaths from dc 'start'
  • Preserve


  • Trigger
    Players
  • Player 8
  • Conditions
  • Force 1 brings at most 0 [men] to 'Arena'
  • Current Player has suffered at least 100 deaths of 'start'
  • Actions
  • Subtract 100 deaths from dc 'start'
  • Preserve


  • If you want a message for the players set a dc for force 1 in the victory and reset level triggers and make separate triggers that display the right message dependent on the dc. You can use the same trick here if you want individual messages for different levels and just always add 1 to the dc when the victory trigger fires and don't preserve the display action. Then you'd need another dc for the reset level message though.
    Keep in mind when working with dcs always work with Current Player or Forces/All Players never set dcs for individual players unless you really want that player to be different for some reason.

    Post has been edited 4 time(s), last time on Jul 27 2010, 10:10 am by NudeRaider.




    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [02:39 am]
    Symmetry -- Man I wish we had this tech back in the day when people played ums lmao
    [06:28 am]
    NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
    [06:26 am]
    NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
    [06:25 am]
    NudeRaider -- Symmetry
    Symmetry shouted: Ohhh imagine a SC map that could delete itself
    not the map, the editor
    [2026-7-16. : 2:28 am]
    Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
    [2026-7-16. : 2:28 am]
    Symmetry -- Ohhh imagine a SC map that could delete itself
    [2026-7-15. : 8:51 pm]
    NudeRaider -- Symmetry
    Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
    yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
    [2026-7-15. : 4:10 am]
    Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
    [2026-7-15. : 2:19 am]
    Symmetry -- NudeRaider
    NudeRaider shouted: Symmetry I can't tell if it's relevant. You provided literally no context so I was providing an equally generic answer.
    Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
    [2026-7-14. : 11:43 pm]
    Ultraviolet -- let's take each other's clothes off :teach:
    Please log in to shout.


    Members Online: l)ark_ssj9kevin