Author Topic: %player.setInvincibleMode ?  (Read 1336 times)

You see, I'm having a problem with the .setInvincibleMode method.
The thing is, it doesn't seem to work at all.

I make a minigame with all types of damage on, and a turret brick on the other side of a "wall" brick, to test with.
I open the mission editor, find the Object ID of my player, close the mission editor, then I open the console and type:
Code: [Select]
%PLAYER_OBJ_ID.setInvincibleMode(25, 0.5);No errors are reported in the console, but nothing happens.

You see, this SHOULD make my screen flash blue, and I should be invincible. Instead, I end up pseudo-suiciding via turret.

What am I doing wrong here?
I want to know how to make this work correctly, so I can make an item which makes you invincible...

*Note: setInvincibleMode(%time, %blinkRate) is reported as a valid method through a %player.dump(); .

Try it with different parameters, because it could be ms, and 25ms isn't much.

Try it with different parameters, because it could be ms, and 25ms isn't much.
I didn't post it, but I have tried 25000 instead of 25 for the first arg, but that still results to nothing good.
Besides, according to the guide in which I originally found this function in, the time arg is in seconds...

Oh well, any other suggestions?

The effect doesn't work in the current version of Blockland for some reason, and it wont stop you being damaged unless the game is scripted to include that - which it isnt.

The effect doesn't work in the current version of Blockland for some reason, and it wont stop you being damaged unless the game is scripted to include that - which it isnt.
Damn, I had a feeling that someone would say that...
Well shoot, I guess I'll have to screw with packages to get my desired "invincible" effect.

Just make the onDamage function return if %this.isInvincible.