Hello.I have a question what exactly is the setvar function?
setvar means "set variable." A variable is a 4-digit number, like 0x5000. All variables are set to 0 when the game starts. The setvar command sets them to a different number. So:
setvar 0x5000 0x1
sets the variable to 1. What this does is allows scripts to be activated when you want them to be. If a script in A-Map is set to variable 5000 and 0000, it will activate whenever you first step on it, because variable 0x5000 is set to 0x0 from the start. However, if in the script you put "setvar 0x5000 0x1" the script won't activate any time afterwards, because it will now be set to 1, and the script in A-Map is saying to only activate when it's set to 0.
I hope that makes some sense.
It's nothing hard ;)Can you give an example of a script? :
To human 2 said something else after talking with the human 1
It's nothing hard ;)
The setvar 0x**** (random numbers) 0x1 can be put right after #org @something command ;)
And as for the explanation... Just think of it as a setflag command for tile scripts :D
So once you put it into the script and you activate that script, that script will disappear from game =)
Just like setflag for NPC :)
Can you specify a script? Example?
What about decompiling some in-game scripts and figuring it out yourself? :)
Ok, so I'm starting to make scripts, and I've ran into something.
I can insert one line scrips, but when I do multi-line scripts (/n /l /p), It makes this weird box show up in the top left corner, and when I press the A button, it goes away and the game freezes. I'm entering everything like I saw on the tutorial and then insert it like I would insert a normal script (like the tutorial said), but it just doesn't work!
Here's the script:
Spoiler:#org $script
lock
faceplayer
message $talk
$talk 1 = Hello./nI'm afraid you can't/lenter the lab right now./lWho are you, any way?/pYou don't look like a trainer!
boxset 6
release
end
Does anyone know what I'm doing wrong?
Vars are like flags, except you can set them to more than just on or off. You can also do basic maths with them.ehh... I don't undertand. Please take me the example. :(