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.
    [04:05 am]
    O)FaRTy1billion[MM] -- the setting exists, it's just hidden in a weird place
    [04:04 am]
    O)FaRTy1billion[MM] -- instead change "Microtile Overlay" to "Impassable"
    [04:04 am]
    O)FaRTy1billion[MM] -- er, wait, idk why i was looking for height
    [04:03 am]
    O)FaRTy1billion[MM] -- below the minimap should be a thing that says "Overlay Settings" with a little + button in the corner, press the + to expand it, uncheck Use Defaults, then change "Tile Overlay" to "Height"
    [03:57 am]
    Sylph-Of-Space -- Unless I'm dum (possible)
    [03:57 am]
    Sylph-Of-Space -- It would be so so so nice if SCMDraft had some kind of dedicated "walkability" view for the tilesets.
    [03:53 am]
    Sylph-Of-Space -- :'( dont cry for me cat-gentina
    [09:18 pm]
    Ultraviolet -- 🔪🐈
    [12:34 pm]
    NudeRaider -- curiosity kills the cat!
    [2024-5-19. : 6:18 am]
    Sylph-Of-Space -- No complaints here, i'm just curious!
    Please log in to shout.


    Members Online: Roy