Units dies , dropped an item... O.O

Rockerboy

New Member
Reaction score
0
An unit dies , and it dropped an item .
But how to make when it respawn again , it drop the same item again ??

I couldnt find a way to use trigger set it ,
anyone can help ?
 

NeuroToxin

New Member
Reaction score
46
just do when a unit dies, random integer, if the random integer is between two numbers, create an item, with a condition of course.
 

Kevinjoha

Member
Reaction score
2
Code:
Event
Unit - A unit died

Conditions
(Unit-Type of (Dying unit)) Equal to (==) Footman

Actions
Item - Create Tome of Experience at (Position of (Dying unit))

now a tome of experience is dropped each time a footman dies
 

hopy

Active Member
Reaction score
64
Code:
Event
Unit - A unit died

Conditions
(Unit-Type of (Dying unit)) Equal to (==) Footman

Actions
Item - Create Tome of Experience at (Position of (Dying unit))

now a tome of experience is dropped each time a footman dies

Add some condition like:
Trigger:
  • conditions
    • (Random intreger between 0 and 10) equal to 1

This should add a 10% chance for it to drop.
 

Kevinjoha

Member
Reaction score
2
He didn't want a chance, he wanted it to drop everytime the unit dies, and in my example i used footman.

You just made a unnecessary post..nice,
 

Bankde

Member
Reaction score
20
He didn't want a chance, he wanted it to drop everytime the unit dies, and in my example i used footman.

You just made a unnecessary post..nice,

Please be nice with other :)

It isn't unnecessary post, it is still very useful for many people. That's why moderators don't delete old post after the problem solve. Other people can still read, search, and learn from them :)
 

Kevinjoha

Member
Reaction score
2
If people need help, they ask for it, people who give them help, don't post other random things. I am nice.
 

eric92

New Member
Reaction score
3
This trigger will drop an item for ever time this specific type of unit dies.

Code:
Short Sword2
    Events
        Unit - A unit Dies
    Conditions
        ((Unit-type of (Dying unit)) Equal to Kobold) and ((Owner of (Dying unit)) Equal to Player 12 (Brown))
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random integer number between 1 and 100) Less than or equal to 2
            Then - Actions
                Item - Create Short Sword at (Position of (Dying unit))
            Else - Actions
        Do nothing

Respawning Hostile Creatures:

Code:
Spawns
    Events
        Unit - A unit owned by Player 12 (Brown) Dies
    Conditions
    Actions
        Wait 90.00 seconds
        Unit - Create 1 (Unit-type of (Dying unit)) for Player 12 (Brown) at (Position of (Dying unit)) facing Default building facing degrees
 

Bankde

Member
Reaction score
20
Respawning Hostile Creatures:

Code:
Spawns
    Events
        Unit - A unit owned by Player 12 (Brown) Dies
    Conditions
    Actions
        Wait 90.00 seconds
        Unit - Create 1 (Unit-type of (Dying unit)) for Player 12 (Brown) at (Position of (Dying unit)) facing Default building facing degrees

This post have already been solved. << :eek:

Anyway your trigger is weak. Leak and might not work. Wait will not work with others like "Dying unit", "Last created unit", "Attacking unit"...etc

Change Dying unit to Triggering unit. Set variable to Location..create unit... then RemoveLocation() to prevent leak.

Never use dying unit, use triggering unit is better.
 

Kevinjoha

Member
Reaction score
2
This trigger will drop an item for ever time this specific type of unit dies.

Code:
Short Sword2
    Events
        Unit - A unit Dies
    Conditions
        ((Unit-type of (Dying unit)) Equal to Kobold) and ((Owner of (Dying unit)) Equal to Player 12 (Brown))
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random integer number between 1 and 100) Less than or equal to 2
            Then - Actions
                Item - Create Short Sword at (Position of (Dying unit))
            Else - Actions
        Do nothing

Respawning Hostile Creatures:

Code:
Spawns
    Events
        Unit - A unit owned by Player 12 (Brown) Dies
    Conditions
    Actions
        Wait 90.00 seconds
        Unit - Create 1 (Unit-type of (Dying unit)) for Player 12 (Brown) at (Position of (Dying unit)) facing Default building facing degrees
stop with this nonsense. This is solved, your just replying with a worse trigger..
Btw im still nice. -.-'
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
I realised that using Triggering Unit is usually better, in case the Event Response variable is one of those that gets overwritten after waits. Triggering Unit will always be the unit that does something to activate the trigger, and will always be the same for every run of the trigger.
 

Rockerboy

New Member
Reaction score
0
Please be nice with other :)

It isn't unnecessary post, it is still very useful for many people. That's why moderators don't delete old post after the problem solve. Other people can still read, search, and learn from them :)

yea , old posts did help me much
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top