PDA

View Full Version : Player stuck invincible?


sssssssssss
10-15-2013, 02:39 AM
My player (and only mine) cannot be hit by players or npcs (Decus the server owner can be hit by me and npcs just fine)...

I've used
player.isinvincible = true/false

and once had these to true, but now are only set false and take out the true stuff
disablenpchits = false;

and this staying on true, because we dont have baddies hit each other, and it says its smoother for npcs if true.
disablenpconnpchits = true;

I've done a scriptscan for my acct name and nothing came up that should be putting only me invincible from hits.

Strange along with my other thread this stuff is all happening all at once kinda...

Tim_Rocks
10-15-2013, 02:41 AM
Did you try restarting your server?

sssssssssss
10-15-2013, 09:37 PM
did npckill npcstart but didn't fix anything.

Jakov_the_Jakovasaur
10-15-2013, 09:41 PM
do other players have the weapon you are setting player.isinvincible = true; with?

sssssssssss
10-15-2013, 09:44 PM
no, did scriptscan nothing is set anywhere else, plus Decus isn't.

I've actually found a link, it seems its linked to my other issue:
http://forums.graalonline.com/forums/showthread.php?t=134268832

Jakov_the_Jakovasaur
10-15-2013, 09:50 PM
im not sure what you mean

my question is what weapon script are you setting player.isinvincible = true; inside of, and does decus possess this weapon script?

or is it a player class joined clientside?

sssssssssss
10-15-2013, 10:15 PM
You can do "/scriptscan all search param" (eg. "/scriptscan all player.isinvincible") to search npcs classes and weapons. Its not set anywhere else. It's the movement system and is linked to the same issue, it seems, I am having with that movement weapon in the link I put because if I update the weapon twice, everything works. Decus has this as well, see the link.

sssssssssss
10-15-2013, 10:26 PM
I lied. It WAS working for a second... now it's not working unless I update movement system twice...

tried player.removeweapon("-System/Movement");
player.addweapon("-System/Movement");

still had to update the weapon for it to work.

Nothing except some destroy() for guis in F2.

Also can't be hit by players, so it's like player.isinvincible is stuck on or something, but it's not set anywhere...


... and now the system/initialize for hiding the stats and stuff isn't working -_- wtf? it has to be updated to show up...

Jakov_the_Jakovasaur
10-15-2013, 10:31 PM
is there something in -System/Movement which is dependent on scripts having been executed from -System/Initialize, or vice versa?

you might need to delay one weapon from starting until it has determined that the other weapon has executed the necessary script

sssssssssss
10-15-2013, 10:43 PM
Only on player death it calls a public function from movement to initialize to make sure the stupid stats get reset again, other than that, no.

I put this back in (took it out earlier)
weaponorder=-GUIProfiles,-System/Initialize,-System/Movement

but it didn't make a difference.

I can hit Decus, I can hit our baddies, Decus can't hit me, baddies cant hit me, unless I update movement once now... and me and decus have the exact same weapons and flags...

The player.isinvincible was once in a class joined to the player, but it hasn't been a week or so now...

Only thing I can think of besides:

player.isinvincible = true/false
disablenpchits = false;
disablenpconnpchits = true;

is:


if (clientr.hit != null) this.hit = clientr.hit;
else this.hit = "roak_player_sword";

replaceani("sword", this.hit);


is the above ok to do? It's working now the last 3 reconnects, and this is commented out. I'm going to try and add it back in I guess...

Jakov_the_Jakovasaur
10-15-2013, 10:58 PM
if its a problem with different scripts depending on eachother then it wouldnt necessarily matter if you are both setup the same. what might matter is how quickly your clients can receive information from the server and whether everything necessary is received before the first weapon script is executed. this would explain why updating weapons causes it to start working properly

for example you might have a weapon script which is using join("class"); clientside. i dont know about right now but at least in the past this has caused problems due to the joined script having to be requested from the server once the main script has been processed, and then code within the joined class wasnt available straight away

without seeing code i can only really speculate lots of different possible reasons

sssssssssss
10-15-2013, 11:02 PM
I'll let you on if you'd like to look temporarily. I don't want to post my entire movement system. I'll be available in like 10-15 mins online again.

Jakov_the_Jakovasaur
10-15-2013, 11:10 PM
i dont see why it could be causing such a serious problem but is the usage of both this.hit and this.hitstyle intentional?
it looks like they are supposed to be the same variable

you could also try using echo(player.isinvincible); to see if that is getting stuck on when it shouldnt be

sssssssssss
10-15-2013, 11:13 PM
That's my bad editing, I didn't really want anyone even slightly knowing why I was doing it, just that I was doing it for the help. xD

I did that in a player.chat and it was constantly 0, it's not even setting the ganis so the movement system isn't loading at all for me. Maybe it's just a single issue for myself since Decus' is working perfectly fine, it's just very strange...

Ok so if the first thing I do is echo "started" in oncreated, then echo "joined classes" after joining classes the very next thing, it gets to started, but thats it. I've commented out each line and tested the classes joined to the weapon, but it didnt make any difference on any of them.

If I update twice it still goes through the entire thing and works.

Edit:

I figured out the invincible part. I should have known, the gani I was using to replace sword was different animations and such, and it was longer. Even when I matched it to .25 seconds total time in the gani, it won't allow me to use that and be hurt by the default sword gani (or our main sword gani, which is just renamed from default with a different sound in it). Didn't know that mattered but I guess that's why? Kinda lame you can't have different animations in a default hit.


Regardless the movement weapon still isn't loading upon login for me whatsoever, unless I update it twice.

Rufus
10-16-2013, 02:08 AM
Off topic, but you should know that player.isinvincible is deceptive and you can still be hurt by projectiles. It's essentially 100ap without the golden name. player.isinvincible2 exists as a 'real' invincibility where nothing hurts the player, but I can't remember if it was added before or after the latest client update.

sssssssssss
10-16-2013, 05:45 PM
I'll try it out. Moving the movement problem back to the movement thread. Shouldn't have mixed the two but thought they were related issues. Instead, they were just both happening at the same time.