Some questions

Toranks

Active member
The manual says:
“slowmotion”, – detects it the slowmotion is active. Useful to detect boss kill (if the slowmotion isn’t disabled)
But

C#:
if (openborvariant("slowmotion"))

if (openborvariant("slowmotion") == 1)

None of these conditionals work. What am I doing wrong?

#------------#

C#:
if(player1 != NULL()){
    changeentityproperty(player1, "invincible", 1);
    changeentityproperty(player1, "invinctime", eTime + 1850);  
    changeentityproperty(player1, "blink", 1);

This code has problems if the player is already invulnerable by magic moves, being hit, rotating attack (attack+jump), etc. Does anyone know a solution or alternative to guarantee 1850 ticks of invencibility?

#-----------------#

This

C#:
changeentityproperty(P1, "model", Name, 0);

Changes the model keeping MP and HP

But this:
C#:
changeentityproperty(P1, "model", Name, 0);
changeentityproperty(P1, "defaultname", Name);

Refills HP and MP to full. Why? How I can avoid that?


(All of these are questions I did on Discord and they couldn't be answered or I didn't find a solution)
 
None of these conditionals work. What am I doing wrong?
This is how I use:

C-like:
void bossCheckAni (void ani){
// Check if there is a slowmotion. If not, change to a specific animation
// Douglas Baldan / O Ilusionista - 2023.11.24
    void self = getlocalvar("self");
    int Boss = openborvariant("slowmotion"); // Check game slowmotion
  
    if (Boss==0){ // if is a boss?
    performattack(self,openborconstant(ani));// Go the desired animation
    }
}

Usage
@cmd bossCheckAni "ANI_FOLLOW3"
*I'm aware that we should not use a openborconstant like that, I just haven't updated my codes yet

Does anyone know a solution or alternative to guarantee 1850 ticks of invencibility?
I can see two issues:
- there is no safe check, so it happens no matter what
- you need to check if the character is invincible before (or check its invincible time you wanna complete the time to reach 1850)
 
This is how I use:

C-like:
void bossCheckAni (void ani){
// Check if there is a slowmotion. If not, change to a specific animation
// Douglas Baldan / O Ilusionista - 2023.11.24
    void self = getlocalvar("self");
    int Boss = openborvariant("slowmotion"); // Check game slowmotion
 
    if (Boss==0){ // if is a boss?
    performattack(self,openborconstant(ani));// Go the desired animation
    }
}

I have tried as you do, 1 is not activated when there is slowmotion. (boss==1)

Regarding what you say about invulnerability, I know how to do it, so I will try to test it in the next few days with a prior check. Thanks!
 
Refills HP and MP to full. Why? How I can avoid that?

I've tried model, defaultname and name changing with script but neither of them refills HP and MP to full.
The only reason I could think of is: the model to change to has less max HP and max MP than previous HP and MP.
Or there is another script which is run when change happens.

Does anyone know a solution or alternative to guarantee 1850 ticks of invencibility?

I didn't ask about this before in discord, what exactly do you mean by guaranteed 1850 ticks? is it:
1. Player get 1850 ticks every time script is run,
OR
2. Player only get total 1850 ticks even if player already invincible before. Ex: player was invincible for 1600 ticks before script is run so the script only adds 250 ticks of invincibility,
OR
3. Something else?
 
Last edited:
Back
Top Bottom