[Trigger] Percentage to kill

Status
Not open for further replies.
Example of 10% chance:

  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Set someInteger = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • someInteger Less than or equal to 10
        • Then - Actions
          • Unit - Remove (someUnit) from the game
        • Else - Actions
 
bone you give him the most primitive trigger. So i will give you better trigger than this.

For variable use intiger

  • Instant kill
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Your ability
    • Actions
      • Set RandomChance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RandomChance Greater than 90
        • Then - Actions
          • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 9999999.00 damage of attack type Chaos and damage type Normal
        • Else - Actions
 
BECOUSE IN MY TRIGGER HAVE KILLER AND IN HIS TRIGGER THE GAME REMOVE THE UNIT ARE YOU RETARD THIS IS NOT DISCUSION THIS IS HELP FORUM IF YOU CAN'T THINK THEN YOU CAN'T HELP I KNOW MY REPUTATION WILL BE RED AGGAIN BUT I DON'T WORRY WHEN IS FOR RIGHT THINGS:thumbs_down:

thanks for attention
 
As well as the reason onix noob provided, his trigger is complete.
Though the event should be:
Unit - A unit starts the effect of an ability
And there is no need for an integer variable.
You can just:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 100) Greater than 90
 
onix_noob, I just said that I noticed that you trigger kills the unit (but I believe theres an Action called 'Unit - Kill' which is more useful.
Even though, I think you shouldn't bring down BoneBreakers suggestion, because it was just the same exept for simply 1 wrong action. That's no reason to bring people or their suggestions down, because their intensions are good. You however are hopefully just in a bad mood today.

ps: discussion in this forum is good, because it helps people understand other peoples suggestions, and can cause new and better solution to problems.


Anyway, I think the problem mentioned in this thread is solved, so no real reason to keep on about this. If there are still problems with these solutions, pkw can just post so :wink:
 
:)
He said "primitive" as in basic(not completed).
There is no "unit - cause unit a to kill unit b" action. So the problem with that is the same as with remove unit.
 
better way to do it without triggers, just use bash with 0.01s stun and 9999999999999999 damage, and make sure no unit more HP than 99...... 9, it should work fine (unless someone is playing mind games on you)
 
chenlimin, pkw has asked for a SPELL that has 10% chance to kill an unit instantly, not for an attack :/
btw you could use this (just for the sake of optimization :) - > I love everything cleaned ,and everything that I make to take as less memory as possible :) ):
Instead of using this :
  • w00t
    • Events
      • Unit - A unit Begins casting an ability
use this :
  • w00t
    • Events
      • Unit - A unit Finishes casting an ability
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to "Your ability"
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • [Random number between 1 and 10] Equal to 1
        • Then - Actions
          • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 9999999.00 damage of attack type Chaos and damage type Normal
        • Else - Actions
Because the previous trigger can easily be abused with abilities that have casting time just by casting spells and then canceling them with Hold Position command.
 
Status
Not open for further replies.
Back
Top