«RetVar/IF» «RefObj» is autojump activated / return value
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 161
- Joined: Tue, 22. Aug 17, 13:14
«RetVar/IF» «RefObj» is autojump activated / return value
Hello,
I noticed that the command :
«RetVar/IF» «RefObj» is autojump activated
returns 2048 when true, instead of 1 like "«RetVar/IF» «RefObj» exists", for example.
Is this normal? If so, why 2048 instead of 1?
Thanks,
-lpa
I noticed that the command :
«RetVar/IF» «RefObj» is autojump activated
returns 2048 when true, instead of 1 like "«RetVar/IF» «RefObj» exists", for example.
Is this normal? If so, why 2048 instead of 1?
Thanks,
-lpa
-
- Posts: 161
- Joined: Tue, 22. Aug 17, 13:14
Why shouldn't I check it..?
I came across this because of a CmdChk prerequisite written like this:
and wondered why the command would be locked no matter what.
So after printing the return value to the logbook to verify it and noticed that it gives 2048 instead of 1, I changed the condition to:
to make it work.
I'm just curious to know whether having 2048 as return value on a true/false check is intended and what would be reason to do so.
I came across this because of a CmdChk prerequisite written like this:
Code: Select all
* check autojump
$autoJ = $Ship-> is autojump activated
skip if $autoJ == [TRUE]
return [CmdConCheck.Disabled]
So after printing the return value to the logbook to verify it and noticed that it gives 2048 instead of 1, I changed the condition to:
Code: Select all
* check autojump
$autoJ = $Ship-> is autojump activated
skip if $autoJ
return [CmdConCheck.Disabled]
I'm just curious to know whether having 2048 as return value on a true/false check is intended and what would be reason to do so.
-
- EGOSOFT
- Posts: 13093
- Joined: Sat, 9. Nov 02, 11:45
-
- Posts: 161
- Joined: Tue, 22. Aug 17, 13:14
@Xenon_Slayer
Yes, the value changes. It's 0 when autojump is off and 2048 when autojump is on.
---
I just checked 'is emergency jump activated', and it apparently has a similar problem: returns 0 when off and 4096 when on. (tested on PLAYERSHIP and another ship. shield threshold % doesn't affect the return value)
Yes, the value changes. It's 0 when autojump is off and 2048 when autojump is on.
---
I just checked 'is emergency jump activated', and it apparently has a similar problem: returns 0 when off and 4096 when on. (tested on PLAYERSHIP and another ship. shield threshold % doesn't affect the return value)
-
- EGOSOFT
- Posts: 13093
- Joined: Sat, 9. Nov 02, 11:45