[Trigger] Item Spawn - help needed

Status
Not open for further replies.
Level 8
Joined
May 31, 2009
Messages
439
Item Spawn - help needed (SOLVED)

Hey guys. I'm currently helping out in a project, and I'm currently making quests. One of these quests is to collect 10 objects from a specific type of unit. Sadly, what happens when I specify the type of unit is that the item doesn't spawn anymore. Although if I don't specify the unit it does appear.

It appears when :

  • Gnoll pelts
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set QUEST_ITEM_DROP = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QUEST_ITEM_DROP Less than or equal to 100
          • QUEST_MAIN[2] Equal to True
        • Then - Actions
          • Set GNOLL_KILLED = True
          • Item - Create Quest Item at (Position of (Dying unit))
          • Item - Make (Last created item) Invulnerable
        • Else - Actions
It doesn't appear when :

  • Gnoll pelts
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set QUEST_ITEM_DROP = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QUEST_ITEM_DROP Less than or equal to 100
          • QUEST_MAIN[2] Equal to True
          • ((Unit-type of (Dying unit)) Equal to Gnoll) or ((Unit-type of (Dying unit)) Equal to Gnoll Poacher)
        • Then - Actions
          • Set GNOLL_KILLED = True
          • Item - Create Quest Item at (Position of (Dying unit))
          • Item - Make (Last created item) Invulnerable
        • Else - Actions
Just for the record, it is 100% certain that the Unit-type trigger is the cause of all of this, I tested it without and works perfectly.

Notice I made the Quest Item Drop 100 on purpose, to see if it will work first, andthen I'll add the percentage ;)
 
Last edited:
Level 5
Joined
May 3, 2009
Messages
129
change it to this
  • Gnoll pelts
    • Events
    • Unit - A unit Dies
    • Conditions
    • ((Unit-type of (Dying unit)) Equal to Gnoll) or ((Unit-type of (Dying unit)) Equal to Gnoll Poacher)
    • Actions
    • Set QUEST_ITEM_DROP = (Random integer number between 1 and 100)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • QUEST_ITEM_DROP Less than or equal to 100
    • QUEST_MAIN[2] Equal to True
    • Then - Actions
    • Set GNOLL_KILLED = True
    • Item - Create Quest Item at (Position of (Dying unit))
    • Item - Make (Last created item) Invulnerable
    • Else - Actions
that should work
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
change it to this
  • Gnoll pelts
    • Events
    • Unit - A unit Dies
    • Conditions
    • ((Unit-type of (Dying unit)) Equal to Gnoll) or ((Unit-type of (Dying unit)) Equal to Gnoll Poacher)
    • Actions
    • Set QUEST_ITEM_DROP = (Random integer number between 1 and 100)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • QUEST_ITEM_DROP Less than or equal to 100
    • QUEST_MAIN[2] Equal to True
    • Then - Actions
    • Set GNOLL_KILLED = True
    • Item - Create Quest Item at (Position of (Dying unit)) <--- Leaks
    • Item - Make (Last created item) Invulnerable
    • Else - Actions
that should work

Set the position first, then clear it.
 
Status
Not open for further replies.
Top