• 🏆 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!

[Trigger] Creep DROP system for rpg

Status
Not open for further replies.
Level 6
Joined
Jun 28, 2016
Messages
70
Hello if someone wanna help me on this i'l be very gratefull, i do not have a very good english, so pardon me for my sentences.

I'm currently trying to build up a rpg but i encounter a Heavy problem with the drop system & tried many triggers to make it work, i believe now that another one of my trigger might be the problem but i can't figure it out.

When i host the map in Multiplayer ( it's a multiplayer map ) the creep boss drop once the item via the trigger, then it never drop again. this problem is for every creeps & i find very unseasy for my project.

If someone has the answer please contact me, send me a message & i will explain you the details via Screenshoot & the map itself.

thanks for your time
cya
 
Level 6
Joined
Jun 28, 2016
Messages
70
Yes my problem is that once the creep drop, after it respawn at his Spawn region set, the creep will no longer drop the items
Here's the Drop system :

753461itemdropJEPG.jpg

I use 2 variable, the creep variable here ChickenItemDrop
And the Position with ItemDropLoc
 
Last edited:
Level 6
Joined
Jun 28, 2016
Messages
70
it worked Thanks, but to think it was just that, it's sick lol :D

Thanks for that noob mistake :)
 
Level 6
Joined
Jun 28, 2016
Messages
70
Could you help me suddently right after fixing the drop system my revival system did not work anymore ??
do you have an efficient revival system for Creep neutral hostile ?
 
For "efficient" revivial systems you should look for a jass system that works with http://www.hiveworkshop.com/threads/snippet-reviveunit.186696/.
It makes a unit resurrect instead of creating a new unit. But I'm not sure if such system exist in a GUI compatible way.

Anyways, efficiency is not the first point, but reaching the goal is important. So you also can re-create units of dying unit type.

The best might be to show triggers if you need help to fix code.
 
Level 6
Joined
Jun 28, 2016
Messages
70
no it doesn't work without the wait variable. here's the trigger :

  • Init Revive Hostile Creeps
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Respawn_Time = 8.00
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
        • Loop - Actions
          • Set Temp_Integer = (Temp_Integer + 1)
          • Unit - Set the custom value of (Picked unit) to Temp_Integer
          • Set Creep_Points[TempInteger] = (Position of (Picked unit)) [/TRGGER]
  • [TRIGGER]Current Respawn Hostile Creeps
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Neutral Hostile
      • (Custom value of (Triggering unit)) Greater than 0
    • Actions
      • Wait Respawn_Time game-time seconds
      • Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at Creep_Points[(Custom value of (Triggering unit))] facing 180.00 degrees
      • Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit)) [/TRGGER]
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
The problem with Current Respawn Hostile Creeps trigger is that you can potentially lose the custom value and unit type.

"Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at Creep_Points[(Custom value of (Triggering unit))] facing 180.00 degrees"
"Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))"
Due to the wait, (Triggering unit) could be null as the unit may have been removed as a result of exploding or triggers. As such nothing may be created. You should use a local variable (only available in JASS directly) to store the values before the wait.

"Wait Respawn_Time game-time seconds"
This leaks a handle due to a bug in the BJ function.
 
Level 6
Joined
Jun 28, 2016
Messages
70
Thanks for everyone, for your answer, but i fixed the trigger by doing a more precise custom value system in two times, it works now.

Thanks alot for your advices, it helped me.
 
Status
Not open for further replies.
Top