YesNoOk
avatar

Distance through redirect. Redirects are better than "pre redirective" trigges. (Read 6842 times)

Started by 2OS, September 28, 2012, 05:37:17 AM
Share this topic:

2OS

Distance through redirect. Redirects are better than "pre redirective" trigges.
#1  September 28, 2012, 05:37:17 AM
  • ****
  • 608 Wannabe
  • Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
    • Egypt
[State Distance]
type=null
trigger1=verify ( numenemy / numpartner / numhelper / ishelper / numtarget / playeridexist(id##########) )
trigger1=var(0):=(ceil(_________,pos x-pos x)*facing)
trigger1=var(1):=(ceil(_________,pos x-pos y))

ceil because accuracy (floor would be inaccurate by 1) and it would otherwise be a float instead of an integer.


fill in the blank:

enemy  ;;  p2
partner  ;;  p3
enemy(numenemy=2)  ;;  p4
enemynear  ;;  will function precisely like the trigger p2dist but will ignore helpertype=player because helpers are not technical enemies. only roots are.
helper
parent
root
target
playerid(id#########)


""pre redirective"" triggers ( p2 p3 p4name, rootdist parentdist ) are horrid because there isn't one for everything ( there is no p2 p3 p4authorname, there is no p3 p4dist. there is no helperdist. through redirects they're ALL POSSIBLE. ) and they're not flexible ( p2dist is ""enemynear,"", you cannot be particular with which enemy you want distance from this way ).

even without ( but especially with ) recursive redirecting being an upcoming plan i personally am wishing these triggers be completely done away with.