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.
    [11:30 pm]
    Ultraviolet -- That's strange, it looks like you targeted the base image file (sometimes people make the mistake of just using the imgur page link which doesn't work for embedding) but it still didn't work it sounds like.
    [03:34 pm]
    ManCubuS -- Used : " [img=https://i.imgur.com/gpOjTuD.jpeg] "
    [03:28 pm]
    ManCubuS -- Even tried with imgur, doesn't attach.
    [03:14 pm]
    ManCubuS -- I should try a workaround, thanks! Sadly imgur is blocked in my country for some unknown reason.
    [03:05 pm]
    NudeRaider -- I think SEN has trouble with https or hotlinking is forbidden. It certainly is nothing about the size, it just fails to get any size. You can get it working if you use imgur and include the actual image link for the img tag. Like this: [img=https://i.imgur.com/ddYqXZa.jpeg]
    [11:15 am]
    ManCubuS -- Hey fellas! Anyone knows why when I try to upload an image it says "failed to get image size"? I even tried making it so small. Imgur isn't working here and I tried postimg no luck.
    [2026-7-23. : 6:40 am]
    Oh_Man -- true
    [2026-7-23. : 3:16 am]
    RIVE -- Still annoyed there was never a trigger to stop or pause wavs.
    [2026-7-23. : 1:40 am]
    Oh_Man -- tthen u come to SCBW and it's like - upload WAV, play WAV.... sigh why cant it be that easy
    [2026-7-23. : 1:40 am]
    Oh_Man -- and no consistent easy to use way to then play the audio either
    Please log in to shout.


    Members Online: Oh_Man