• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Special Effects Quest isn't deleting

Status
Not open for further replies.
Level 3
Joined
Dec 31, 2008
Messages
46
It'll delete the first special effect, but not the 2nd one (in Quest 1 End)

  • Quest 1 Start
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
    • Conditions
      • (Triggering unit) Equal to QuestGivers[1]
    • Actions
      • Set TempLoc1 = (Position of Hero[(Player number of (Triggering player))])
      • Set TempLoc2 = (Position of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between TempLoc1 and TempLoc2) Greater than or equal to 200.00
        • Then - Actions
          • Game - Display to (Player group((Triggering player))) the text: John: Come closer!
        • Else - Actions
          • Special Effect - Destroy QuestEffect[1]
          • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Objects\RandomObject\RandomObject.mdl
          • Set QuestEffect[1] = (Last created special effect)
          • Quest - Create a Required quest titled Stop The Bandits! with the description Kill 10 Bandits ..., using icon path ReplaceableTextures\CommandButtons\BTNBandit.blp
          • Set Quest[1] = (Last created quest)
          • Trigger - Turn off (This trigger)
          • Trigger - Turn on Quest 1 Progress <gen>
          • Custom script: call RemoveLocation(udg_TempLoc1)
          • Custom script: call RemoveLocation(udg_TempLoc2)
  • Quest 1 Progress
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Bandit
      • ((Killing unit) is A Hero) Equal to True
    • Actions
      • Set QuestStatus[1] = (QuestStatus[1] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QuestStatus[1] Equal to 10
        • Then - Actions
          • Game - Display to (All players) the text: Quest: Stop The Ban...
          • Trigger - Turn off (This trigger)
          • Trigger - Turn on Quest 1 End <gen>
        • Else - Actions
          • Game - Display to (Player group((Owner of (Killing unit)))) the text: (Quest: Stop The Bandits! Progress + ((String(QuestStatus[1])) + of 10.))
  • Quest 1 End
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
    • Conditions
      • (Triggering unit) Equal to QuestGivers[1]
    • Actions
      • Special Effect - Destroy QuestEffect[1]
      • Quest - Destroy Quest[1]
      • Quest - Create a Optional quest titled Stop The Bandits! with the description Completed!, using icon path ReplaceableTextures\CommandButtons\BTNBandit.blp
      • Trigger - Turn off (This trigger)
 
Level 3
Joined
Dec 31, 2008
Messages
46
You're using the same event 2x which is causing interference

Try this
  • Quest 1 End
    • Events
      • Player - Player 1 (Red) Deselects a unit <---
      • Player - Player 2 (Blue) Deselects a unit <---
      • Player - Player 3 (Teal) Deselects a unit <---
      • Player - Player 4 (Purple) Deselects a unit <---
      • Player - Player 5 (Yellow) Deselects a unit <---
      • Player - Player 6 (Orange) Deselects a unit <---
      • Player - Player 7 (Green) Deselects a unit <---
      • Player - Player 8 (Pink) Deselects a unit <---
    • Conditions
      • (Triggering unit) Equal to QuestGivers[1]
    • Actions
      • Special Effect - Destroy QuestEffect[1]
      • Quest - Destroy Quest[1]
      • Quest - Create a Optional quest titled Stop The Bandits! with the description Completed!, using icon path ReplaceableTextures\CommandButtons\BTNBandit.blp
      • Trigger - Turn off (This trigger)

I didn't explain enough of what the problem was, but I did go out on a limb and try this, with the same results as before.

What the problem is is that the line below is not doing anything, the rest of the trigger is working correctly.
  • Special Effect - Destroy QuestEffect[1]
 
Level 12
Joined
Mar 17, 2007
Messages
412
I didn't explain enough of what the problem was, but I did go out on a limb and try this, with the same results as before.

What the problem is is that the line below is not doing anything, the rest of the trigger is working correctly.
  • Special Effect - Destroy QuestEffect[1]

I think the problem is this
  • Conditions
    • (Triggering unit) Equal to QuestGivers[1]
Put a game display text message right above this to test to see if it's even firing
  • Special Effect - Destroy QuestEffect[1]

I would try also try this EDITED:
  • Conditions
    • (Triggering player) Not equal to (Owner of (Triggering unit))
    • (Triggering unit) Equal to QuestGivers[1]
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
You're always using index 1, that's why. To be able to truly queue effects, you need to implement an indexing of some kind, there's a tutorial for indexing written by Purgeandfire, if you'd like to know more.

EDIT: A more broader explanation would be; Index 1 will be overwritten when a new instance is triggered (detected) and the previous one will be lost so you can never destroy it.
 
Level 3
Joined
Dec 31, 2008
Messages
46
I think the problem is this
  • Conditions
    • (Triggering unit) Equal to QuestGivers[1]
Put a game display text message right above this to test to see if it's even firing
  • Special Effect - Destroy QuestEffect[1]

I would try also try this
  • Conditions
    • (Owner of (Triggering unit)) Equal to (Player #)
    • (Triggering unit) Equal to QuestGivers[1]

It is firing, but to double check, I did add the display. It did show the display
 
Level 3
Joined
Dec 31, 2008
Messages
46
You're always using index 1, that's why. To be able to truly queue effects, you need to implement an indexing of some kind, there's a tutorial for indexing written by Purgeandfire, if you'd like to know more.

Can you not replace a special effect in a variable with a different special effect?
 
Level 3
Joined
Dec 31, 2008
Messages
46
You can, but the previous special effect will no longer be accessible to you.

In this case, its quite alright, I'm placing an exclamation mark over their head to signify they have a quest.

When they accept the quest it will change to a question mark.

When they turn the quest in, the question mark should disappear.

Sadly the question mark lingers.

EDIT: I have a seperate Trigger that sets the exclamation mark for all quest-givers
 
Level 12
Joined
Mar 17, 2007
Messages
412
In this case, its quite alright, I'm placing an exclamation mark over their head to signify they have a quest.

When they accept the quest it will change to a question mark.

When they turn the quest in, the question mark should disappear.

Sadly the question mark lingers.

EDIT: I have a seperate Trigger that sets the exclamation mark for all quest-givers

  • Conditions
    • (Triggering player) Not equal to (Owner of (Triggering unit))
    • (Triggering unit) Equal to QuestGivers[1]
Try this
 
Level 3
Joined
Dec 31, 2008
Messages
46
  • (Triggering player) Not equal to (Owner of (Triggering unit))
Try this

The problem isn't with the condition. The trigger is running, but when it goes to destroy the special effect, it can't figure out where the special effect is...

Thank you, you gave me an idea for checking out whats going on... Will post results.

EDIT: That didn't work lol, I was going to have it display a check of what effect is currently QuestEffect[1]
 
Level 12
Joined
Mar 17, 2007
Messages
412
The problem isn't with the condition. The trigger is running, but when it goes to destroy the special effect, it can't figure out where the special effect is...

Thank you, you gave me an idea for checking out whats going on... Will post results.

I understand that, I use something very similiar but you're using a player event with a unit condition, so if you put the condition I just showed in both the first and end it should work
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
In this case, its quite alright, I'm placing an exclamation mark over their head to signify they have a quest.

When they accept the quest it will change to a question mark.

When they turn the quest in, the question mark should disappear.

Sadly the question mark lingers.

EDIT: I have a seperate Trigger that sets the exclamation mark for all quest-givers

What I mean is, the exclamation mark will never go away because you did not destroy it. If you want something like that then whenever the trigger fires, destroy the contents of index 1 first before overwriting it.
 
Level 3
Joined
Dec 31, 2008
Messages
46
What I mean is, the exclamation mark will never go away because you did not destroy it. If you want something like that then whenever the trigger fires, destroy the contents of index 1 first before overwriting it.

The exclamation mark does go away, it is deleted at the beginning of Quest Start, first 3 lines.

  • Special Effect - Destroy QuestEffect[1]
  • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Objects\RandomObject\RandomObject.mdl
  • Set QuestEffect[1] = (Last created special effect)
 
Level 3
Joined
Dec 31, 2008
Messages
46
Found the Problem, it turns out that the trigger was never the problem, the effect for the question mark doesn't have a death animation, therefore when destroyed, it will just kinda... linger... until its finished decaying, which I've never sat around long enough to see.
 
Level 3
Joined
Dec 31, 2008
Messages
46
That is a bit strange I cannot use the selection event without a player condition for some reason,

also here are 2 models I've found that might have a better animation for you I didn't test so I wouldn't know

?????

!!!!!

If you want me to take a look at it you can send me a pm with it.

EDIT: Thank you for the links, I actually downloaded them right before seeing your post.

Cool then. Congratulations finding the bug.

`Sank yew.
 
Status
Not open for further replies.
Top