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

Duff 1.0.1

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: deepstrasz
Well I figured its finally time to upload this and I think people will find this useful... If only someone figured this out earlier, more people would have been able to fix their stuff and find this even more so in usefulness.

Please let me know if you find any bugs/suggestions.

Explanation of system since it may be required:

This is used as many other systems to detect/do stuff. This detects when a transformation starts and ends. Similar to systems like when a unit moves or when a unit attacks. This won't lag unless your unlucky enough to come by a drop hacker(Some type of order-spam auto-clicking program outside of game.) which isn't my problem. I'll be uploading an anti-drop-hack system eventually. =)

[trigger=]
DUFF Catch
Events
Unit - A unit Begins casting an ability
Conditions
Actions
-------- Dont touch unless you know what your doing. --------
-------- This is where we identify then record the transforming unit. --------
Set tempunit = (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is in DUFF_group) Equal to True
Then - Actions
Set tempunit = No unit
Skip remaining actions
Else - Actions
Set DUFF_index = (DUFF_index + 1)
Set DUFF_unit[DUFF_index] = tempunit
Set DUFF_Type[DUFF_index] = (Unit-type of DUFF_unit[DUFF_index])
Set DUFF_IsTransformed[DUFF_index] = True
Unit Group - Add DUFF_unit[DUFF_index] to DUFF_group
Set tempunit = No unit
[/trigger]
[trigger=]
DUFF Wonder
Events
Unit - A unit Is issued an order targeting an object
Unit - A unit Is issued an order targeting a point
Unit - A unit Is issued an order with no target
Conditions
Actions
-------- This is where we track our transformed units. --------
Set tempunit = (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is in DUFF_group) Equal to False
Then - Actions
Set tempunit = No unit
Skip remaining actions
Else - Actions
For each (Integer DUFF_loop) from 1 to DUFF_index, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DUFF_Type[DUFF_loop] Equal to (Unit-type of DUFF_unit[DUFF_loop])
Then - Actions
-------- Delete this line if you no longer need it. --------
Game - Display to (All players) the text: ((Name of tempunit) + has reverted!)
-------- Delete the above line if you no longer need it. --------
-------- This is where we de-index and switch over all the other index's. --------
Set DUFF_IsTransformed[DUFF_loop] = False
Unit Group - Remove DUFF_unit[DUFF_loop] from DUFF_group
Set DUFF_Type[DUFF_loop] = DUFF_Type[DUFF_index]
Set DUFF_Type[DUFF_index] = No unit-type
Set DUFF_IsTransformed[DUFF_loop] = DUFF_IsTransformed[DUFF_index]
Set DUFF_unit[DUFF_loop] = DUFF_unit[DUFF_index]
Set DUFF_unit[DUFF_index] = No unit
Set DUFF_index = (DUFF_index - 1)
Set DUFF_loop = (DUFF_loop - 1)
Else - Actions
-------- Delete this line if you no longer need it. --------
Game - Display to (All players) the text: false
-------- Delete the above line if you no longer need it. --------
-------- This is where your transformed unit is detected. --------
Set tempunit = No unit
[/trigger]

A little notice.... I clean all leaks no matter how tiny. =)


Dat
Unit
Finding
Fun

( Tried so hard to put a Simpson picture here, but I failed horribly.... Just imagine Homer holding a can of his favourite drink or DUFFman. I suppose that duff movie fits here even better with that girl. )


Keywords:
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,And now you know your alphabet!,!,Tal0n,Dat,C3,-,@,#,$,%,^,&,*,(,),1,2,3,4,5,6,7,8,9,0,epic,ca
Contents

DUFF (Map)

Reviews
12th Dec 2015 IcemanBo: For long time as NeedsFix. Rejected. 17:51, 1st Apr 2015 IcemanBo: Read post in thread.

Moderator

M

Moderator

12th Dec 2015
IcemanBo: For long time as NeedsFix. Rejected.

17:51, 1st Apr 2015
IcemanBo: Read post in thread.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
At the top of both of your triggers, you use Triggering unit instead of tempunit.
tempunit does not has to be nulled.

Next to that... it looks pretty eat but dunno if it is really that usefull.
Gotta do some tests about transforming.
Maybe explain the reason for making it so people like me can know why it was made in the first place.
 
At the top of both of your triggers, you use Triggering unit instead of tempunit.
tempunit does not has to be nulled.

Next to that... it looks pretty eat but dunno if it is really that usefull.
Gotta do some tests about transforming.
Maybe explain the reason for making it so people like me can know why it was made in the first place.

Well you can't use tempunit without setting it to triggering unit. Yeah it has to be nulled because I want it too.

"pretty eat"...? Well you haven't done much with transformed unit data then. The reason is to re-apply whatever without crashes/bugs. For example spell-books mess up with transformations. You can also apply this for Chaos as well, just requires some editing depending on how you'll be using it.
 
Set tempunit to (Triggering unit)
if (Triggering unit) is in DUFFgroup then

Why not use tempunit?

Woah.... How did I miss that... Lol thanks Wietlol. Will fix on next update. :thumbs_up:

This is more a "ChangeUnitTypeDetection".
The event onOrder is not acceptable. If unit doesn't get any order you will never detect a change even it exists.

Edit:
Also registration on any single cast? I don't understand this.

Well you can feel free to label it like that, but I went for a more unique name that says the same thing instead of the repeated decade name besides.... People had a long time to make this, but didn't.

Well too bad..... I chose that event. It's far better then a timer or so I think. How so? It works pretty well actually. =)
Well I don't quite remember but I think when I did it with orders it messed up however there is no un-version of all transform abilities so I figured to do this instead since its less buggy and well easier on everyone. Since there is one that can't be caught on order that I remember which is Chaos.
 
Top