Jump to content

Photo

Zasm : weird problem with variables


  • Please log in to reply
2 replies to this topic

#1 Dorian

Dorian

    Adept

  • Members
  • Location:France

Posted 29 April 2007 - 02:58 AM

I was bored and I read that topic
I made it worked, then I read revfan's tutorial and I made that :
CODE
COMPAREV linkmp,32
GOTOMORE EXE
GOTOLESS END
EXE SUBV linkmp,2
ADDV linkhp,1
END WAITFRAME


or :
if link's magic > or = 32
magic - 2
heart + 1

I didn't set up the condition to avoid linkhp > link max hp yet
but here is my problem :
the condition is respected but the number of magic/heart lost/gained is not the same as in my code
link will lose all his magic and gain for exemple about 5 heart....

steange, isn't it?

I used beta 254 to make the scrpit work
but it's also very strange, the first time I created a qst file with the original script inside, I could load it as a custom quest, but now with the current modified script, it won't load anymore to create a new file (I have the message "Not a custom quest"). Maybe it's something wrong with my script?

I'm looking forward your help icon_biggrin.gif
Dorian


#2 Revfan9

Revfan9

    Hero of Time

  • Banned
  • Real Name:Dr. Pajamas
  • Location:In front of a screen

Posted 29 April 2007 - 10:50 AM

Well, the "Not a custom quest" thing is probably because you set the "Quest Number" to any number other than 0.

Also, 32 is the number for a full magic meter, with the max number of containers the player can get. Maybe instead of COMPAREV linkmp,32, you should use COMPARER linkmp,linkmaxmp? And don't worry about Link's HP going higher than his max HP, ZC's engine takes care of that for you.


Buuut if that doesn't work, then I don't have a clue what is wrong, because that would be really strange, and it's probably a bug with item scripts (this is an item script, right?)

#3 Dorian

Dorian

    Adept

  • Members
  • Location:France

Posted 29 April 2007 - 12:47 PM

QUOTE
Well, the "Not a custom quest" thing is probably because you set the "Quest Number" to any number other than 0.

that's right! icon_biggrin.gif It resolved my problem

QUOTE
32 is the number for a full magic meter

well... not with me. 16 = 1 magic container...

QUOTE
And don't worry about Link's HP going higher than his max HP, ZC's engine takes care of that for you.

not with scripts, the engine will only restore link's hp to hpmax if you take an heart for example

my script worked... finally and for an unknow reason
I don't know what hapened yesterday~ and all was variable O_o
anyway thanks for your help
I'll give up my non sense quest... I need the possibility to add custom items to the subscreen to have fun with item script
have a look at my craziness lol XD





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users