Ilovefoxes, on Sep 7 2009, 08:52 PM, said:
Yeah, they both have statnum 10, which is weird. Try "ifspawnedby APLAYER" which is only true for the hologram.
EDIT: This should work also -- ifvarvarn THISACTOR player[THISACTOR].i // hologram if true
Ilovefoxes, on Sep 7 2009, 08:52 PM, said:
This post has been edited by DeeperThought: 07 September 2009 - 08:10 PM
Ilovefoxes, on Sep 8 2009, 05:52 AM, said:
XThX2 said:
This post has been edited by lycanox: 08 September 2009 - 04:11 AM
gamevar MYENEMY -1 2 // records who my actor will attack
gamevar DTEMP1 -1 2 // records the ID of what projectile (or attack) that hit the actor
gamevar DTEMP2 0 2 // used as a temp value
gamevar DTEMP3 -1 2 // records the ID of who shot the actor or inflicted damage if melee
gamevar RECORD1 -1 2 // used as a temp, in this case it'll record the distance obtained through the dist command
gamevar RECORD2 -1 2 // used as a temp, in this case it'll record the distance obtained through the dist command
ifvare DTEMP3 -1 // you were hit but this value was not set meaning it was a projectile that hit the actor
{
getactor[THISACTOR].htowner DTEMP3 // know who's hit you
getactor[THISACTOR].htpicnum DTEMP1 // know what's hitting you
}
ifvare MYENEMY -1 setvarvar MYENEMY DTEMP3 // if you have no enemy ID then treat who hit you as the enemy
else // you had an enemy ID but now you have 2!
{
ifvarg MYENEMY -1 // you have an enemy ID
{
getactor[MYENEMY]statnum DTEMP2
ifvarn DTEMP2 1024 dist [RECORD1] [THISACTOR] MYENEMY
}
else setvar RECORD1 99999
ifvarg DTEMP3 -1 // you have an ID of the projectile's owner
{
getactor[DTEMP3]statnum DTEMP2
ifvarn DTEMP2 1024 dist [RECORD2] [THISACTOR] DTEMP3
}
else setvar RECORD2 99999
ifvarvarl RECORD2 RECORD1 setvarvar MYENEMY DTEMP3 // the new enemy is closer so record his ID!
}
setvar DTEMP1 -1 // erase the knowledge of who hit you - its no longer needed.
setvar RECORD1 -1
setvar RECORD2 -1This post has been edited by Chip: 08 September 2009 - 12:33 PM
XThX2, on Sep 8 2009, 09:27 PM, said:
Quote
Quote
This post has been edited by Chip: 08 September 2009 - 12:32 PM
DeeperThought, on Sep 8 2009, 09:45 PM, said:
ifvarg DTEMP3 -1 // you have an ID of the projectile's owner
{
getactor[DTEMP3]statnum DTEMP2
ifvarn DTEMP2 1024 dist [RECORD2] [THISACTOR] DTEMP3
}
else setvar RECORD2 99999
XThX2, on Sep 8 2009, 01:27 PM, said:
This post has been edited by Chip: 09 September 2009 - 02:26 AM
Ilovefoxes, on Sep 9 2009, 10:58 AM, said:
Plagman, on Sep 9 2009, 04:10 AM, said:
DeeperThought, on Sep 9 2009, 04:35 PM, said:
Plagman, on Sep 9 2009, 07:55 AM, said:
This post has been edited by DeeperThought: 10 September 2009 - 03:37 PM
This post has been edited by Ilovefoxes: 09 September 2009 - 07:24 PM
Ilovefoxes, on Sep 9 2009, 07:40 PM, said:
Quote
Quote
This post has been edited by Ilovefoxes: 09 September 2009 - 09:44 PM
Quote
Quote
This post has been edited by Ilovefoxes: 10 September 2009 - 09:16 AM
This post has been edited by Chip: 10 September 2009 - 12:12 PM
This post has been edited by lycanox: 10 September 2009 - 02:00 PM
lycanox, on Sep 10 2009, 10:27 PM, said:
Quote
This post has been edited by XThX2: 11 September 2009 - 03:12 PM
getactor[THISACTOR].ang angvar
ifhitweapon
{
setactor[THISACTOR].ang angvarThis post has been edited by DeeperThought: 11 September 2009 - 04:31 PM