blackkat9666 Posted October 28, 2008 Author Share Posted October 28, 2008 when a player dies, instead of having full HP, i would like for them to only have 1HP, can anyone help me? Link to comment Share on other sites More sharing options...
Lenton Posted October 28, 2008 Share Posted October 28, 2008 In> Sub OnDeath(index).Use this line of code> SetPlayerHP(index, 1) Link to comment Share on other sites More sharing options...
blackkat9666 Posted October 28, 2008 Author Share Posted October 28, 2008 where do i put it? just under Sub OnDeath(index)?By the way, in case it's help, I'm using TEAnd also, i still want them to teleport to the map where everyone goes when they die…so if i replace> Sub OnDeath(index)with what you said, will they still go where they die to?And I'm still not sure where it goes… Link to comment Share on other sites More sharing options...
DarkMazer Posted October 28, 2008 Share Posted October 28, 2008 Try this:```Sub OnDeath(index) 'stuff that's already there '... '... Call SetPlayerHP(index) Call SendHP(index)End Sub```I'm not sure if that works in TE, but it can't hurt to try. Link to comment Share on other sites More sharing options...
blackkat9666 Posted October 28, 2008 Author Share Posted October 28, 2008 i tried it like this but it didn't teleported me to where players go when they die…i just stayed at the same place i was killed and with full hp...> Sub OnDeath(index)> Dim mapnum> Dim x> Dim y> Dim i> i = GetPlayerClass(index)> > mapnum = GetVar("Classes\Class" & i & ".ini", "CLASS", "Map")> y = GetVar("Classes\Class" & i & ".ini", "CLASS", "y")> x = GetVar("Classes\Class" & i & ".ini", "CLASS", "x")> > Call SetPlayerHP(index, 1)> Call SendHP(index)> End Sub> > Call PlayerWarp(index, mapnum, x, y)> End Sub> > Sub SetBlock(map, X, Y)> Call SetAttribute(map,X,Y,1,0,0,0,"","","")> End Sub> > Sub SetWarp(map, X, Y, warpmap, warpx, warpy)> Call SetAttribute(map,X,Y,2,warpmap,warpx,warpy,"","","")> End Sub> > Sub SetHeal(map, X, Y)> Call SetAttribute(map,X,Y,7,0,0,0,"","","")> End Sub> > Sub SetKill(map, X, Y)> Call SetAttribute(map,X,Y,8,0,0,0,"","","")> End Sub> > Sub SetItem(map, X, Y, item, value)> Call SetAttribute(map,X,Y,3,item,value,0,"","","")> End Sub> > Sub SetNPCAvoid(map, X, Y)> Call SetAttribute(map,X,Y,4,0,0,0,"","","")> End Sub> > Sub SetKey(map, X, Y, key, take)> Call SetAttribute(map,X,Y,5,key,take,0,"","","")> End Sub> > Sub SetKeyOpen(map, X, Y, keyx, keyy, message)> Call SetAttribute(map,X,Y,6,keyx,keyy,0,message,"","")> End Sub> > Sub SetShop(map, X, Y,shop)> Call SetAttribute(map,X,Y,9,shop,0,0,"","","")> End Sub> > Sub SetClassBlock(map, X, Y,allow1,allow2,allow3)> Call SetAttribute(map,X,Y,10,allow,allow2,allow3,"","","")> End Sub> > Sub SetArena(map, X, Y,amap,ax,ay)> Call SetAttribute(map,X,Y,11,amap,ax,ay,"","","")> End Sub> > Sub SetSound(map, X, Y,filename)> Call SetAttribute(map,X,Y,12,0,0,0,filename,"","")> End Sub> > Sub SetSpriteChange(map, X, Y,sprite,item,cost)> Call SetAttribute(map,X,Y,13,sprite,item,cost,"","","")> End Sub> > Sub SetSign(map, X, Y,line1,line2,line3)> Call SetAttribute(map,X,Y,14,0,0,0,line1,line2,line3)> End Sub> > Sub SetDoor(map, X, Y)> Call SetAttribute(map,X,Y,15,0,0,0,"","","")> End Sub> > Sub SetNotice(map, X, Y, title, text, filename)> Call SetAttribute(map,X,Y,16,0,0,0,title,text,filename)> End Sub> > Sub SetChest(map, X, Y)> Call SetAttribute(map,X,Y,17,0,0,0,"","","")> End Sub> > Sub SetScripted(map, X, Y, script)> Call SetAttribute(map,X,Y,18,script,0,0,"","","")> End Sub> > Sub SetBank(map, X, Y)> Call SetAttribute(map,X,Y,23,0,0,0,"","","")> End Sub> > Sub SetHouse(map, X, Y,item,cost)> Call SetAttribute(map,X,Y,21,item,cost,0,"","","")> End Sub Link to comment Share on other sites More sharing options...
Jetblack Angel Posted October 28, 2008 Share Posted October 28, 2008 @blackkat9666:> where do i put it? just under Sub OnDeath(index)?> By the way, in case it's help, I'm using TEWhy are you using TE? That's pretty outdated. Link to comment Share on other sites More sharing options...
blackkat9666 Posted October 28, 2008 Author Share Posted October 28, 2008 my computer can't handle ee 2.7 >_> Link to comment Share on other sites More sharing options...
Jetblack Angel Posted October 28, 2008 Share Posted October 28, 2008 Ah, ok. Link to comment Share on other sites More sharing options...
DarkMazer Posted October 28, 2008 Share Posted October 28, 2008 ```Sub OnDeath(index)Dim mapnumDim xDim yDim ii = GetPlayerClass(index)mapnum = GetVar("Classes\Class" & i & ".ini", "CLASS", "Map")y = GetVar("Classes\Class" & i & ".ini", "CLASS", "y")x = GetVar("Classes\Class" & i & ".ini", "CLASS", "x") Call SetPlayerHP(index, 1) Call SendHP(index)End Sub '<- this lineCall PlayerWarp(index, mapnum, x, y)End Sub```Take out the first End Sub, and that should fix it. Link to comment Share on other sites More sharing options...
blackkat9666 Posted October 29, 2008 Author Share Posted October 29, 2008 i tried it and it still revived me with full hp Link to comment Share on other sites More sharing options...
DarkMazer Posted October 30, 2008 Share Posted October 30, 2008 I guess that confirms my suspicion that HP is reset to max after OnDeath is called. What that means, then, is that you can't get people to revive with 1 HP unless you edit the source code. Link to comment Share on other sites More sharing options...
blackkat9666 Posted October 30, 2008 Author Share Posted October 30, 2008 ergh, well, thanks anyways guys Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now