Page 1 of 1

Variable in the serpant ward script

Posted: Fri Jul 29, 2005 6:26 am
by eM-Viper
I would like to know what the variable is for who placed the serpant ward. I would like to make it so that if an enemy goes into your serpant ward it makes your screen glow. So I went to the skills.inl and went down to shadow hunters serpant wards (i am glad you wrote lots of notes in your code.)

Code: Select all

			if ( distancebetween < 85 ){
				damage = 10
				WAR3_damage(targetid, id, damage, CSW_SERPENTWARD, -1)
				client_cmd(targetid, "speak ambience/thunder_clap.wav")
				Create_ScreenFade(targetid, (1<<10), (1<<10), (1<<12),  red, green, blue, 255)
			}
and added

Code: Select all

 Create_ScreenFade(id, (1<<10), (1<<10), (1<<12), 255, 0, 0, 0)
after the first Create_ScreenFade.

I changed targetid, to id hoping that was who put it down, but i dont know what the variable for the person that lays it. I know there has to be one, cause when u die from it, it says who killed u. If you can help me out that would be great. thanks -Viper

Posted: Fri Jul 29, 2005 9:04 am
by Geesu
it should make your screen glow if an enemy goes into it already....

Posted: Fri Jul 29, 2005 12:33 pm
by eM-Viper
it doesnt, i was testing this earlier, if u r taking damage from it, then yes your screen glows. however if u place one say by a door, when the enemy comes threw and takes some damage, it acts as like a warning device, the enemy has tripped one of your wards. I saw in the skills.inl (at least i think it was there) the variables were attacker and victem, here it is somethin and targetid.

Posted: Fri Jul 29, 2005 2:39 pm
by Geesu
targetid is the victim

Posted: Fri Jul 29, 2005 4:57 pm
by eM-Viper
correct, i am looking for the attacker

Posted: Fri Jul 29, 2005 5:34 pm
by Geesu
id

Posted: Fri Jul 29, 2005 6:25 pm
by eM-Viper
then technicly this should cause both screens to glow, the victem to glow much brighter due to the alpha (what ever that is)

Code: Select all

			if ( distancebetween < 85 ){
				damage = 10
				WAR3_damage(targetid, id, damage, CSW_SERPENTWARD, -1)
				client_cmd(targetid, "speak ambience/thunder_clap.wav")
				Create_ScreenFade(targetid, (1<<10), (1<<10), (1<<12), red, green, blue, 255)
				Create_ScreenFade(id, (1<<10), (1<<10), (1<<12), 255, 0, 0, 0)
			}
unfortunatly this is not tha case, and i need to wait till i have some one again to test with on the server......no one is being coperative and i think i accadently some how caused the wards to stop functning

Posted: Fri Jul 29, 2005 10:50 pm
by Geesu
What are you trying to do? I don't understand, both screens fade, caster and enemy

Posted: Sat Jul 30, 2005 1:43 pm
by Avanderik
I remember the Shadow Hunter's screen glowed red when an enemy ran trhough a ward.

Posted: Sun Jul 31, 2005 9:18 am
by eM-Viper
Right I am trying to make both screens fade, kinda like when you are undead, you shoot threw a wall and u hit some one, it causes their screen to glow and u know some one is there. Same idea It's like setting alarm/boobie traps. you may not know which ward was the enemy triped but it lets the caster know that he should take a look.