Dinisk
DinisK
- 89
- Posts
- 8
- Years
- Seen Apr 27, 2019
(sorry for english) and Hello, I can not figure out how to make the script work at the very beginning of the game (after all, you need to step on it) there is an option to put four scripts on four sides, but my location will start with the animation of the machine, and the player?s movement cannot be allowed. In the emerald there is such a function and it looks like callasm is accessing it, but I cannot copy the hxd code and paste it into my own. I heard about the third and fifth level scripts when closing the map and opening it. Maybe they work on the appearance of the player? I tried to create a hero with a sprite number (not myself) 0xff that he clicked on the script and made the script work, but somewhere there was an error ... that?s where my brain exploded. There is something else. I created a fountain and I want to loop its animation, it looks like it can be done return and call without end. I did it once, and I lost this construction. In any case, the fountain turns on, runs an animation cycle (one) and stops in the last frame. it was removed accordingly, so that I could move when the fountain is working / not working. And can it be done so that its animation would always be, if I turn it on, even I went beyond the location (10 cells) and come back. this has a connection with my first thought about activating the script when spawning to the card (you can fill the entire card with a script with the fountain turned on, but this is a bad option for me).
fountain script itself:
#dynamic 0x800000
#org @start
checkflag 0x1e(0x200)
if 0x0 goto @chs
if 0x1 goto @No
end
#org @chs
msgbox @chs2 0x5
compare 0x800D 0x1
if 0x1 goto @Yes
if 0x0 goto @No
end
#org @No
msgbox @No2 0x6
applymovement 0x14 @moveoff
end
#org @Yes
msgbox @Yes2 0x6
setflag 0x1e(0x200)
applymovement 0x14 @moveon
clearflag 0x1e(0x200)
end
#org @chs2
= Turn on the fountain?
#org @No2
= Turn off the fountain
#org @Yes2
= You pressed the switch
#org @moveoff
#raw 0xff //sprite set frame 9(in NSE) on map walk on the spot(down) 4d, in this way I get the opportunity to use an extra frame
#raw 0xfe //end stop animation
#org @moveon //cycle of sprites of five frames, some raw contain two frames or one ,on result five ,do not pay attention to which sprite corresponds to the frame, it does not matter
#raw 0x2b
#raw 0x18
#raw 0x29
#raw 0x18
#raw 0x4
#raw 0xfe
//during switching on//off, turning off the fountain, it is desirable that its state can be changed
fountain script itself:
![[PokeCommunity.com] how to enable the script on the spawn hero and looping animation movement [PokeCommunity.com] how to enable the script on the spawn hero and looping animation movement](https://i.imgur.com/SKPyyMU.png)
#dynamic 0x800000
#org @start
checkflag 0x1e(0x200)
if 0x0 goto @chs
if 0x1 goto @No
end
#org @chs
msgbox @chs2 0x5
compare 0x800D 0x1
if 0x1 goto @Yes
if 0x0 goto @No
end
#org @No
msgbox @No2 0x6
applymovement 0x14 @moveoff
end
#org @Yes
msgbox @Yes2 0x6
setflag 0x1e(0x200)
applymovement 0x14 @moveon
clearflag 0x1e(0x200)
end
#org @chs2
= Turn on the fountain?
#org @No2
= Turn off the fountain
#org @Yes2
= You pressed the switch
#org @moveoff
#raw 0xff //sprite set frame 9(in NSE) on map walk on the spot(down) 4d, in this way I get the opportunity to use an extra frame
#raw 0xfe //end stop animation
#org @moveon //cycle of sprites of five frames, some raw contain two frames or one ,on result five ,do not pay attention to which sprite corresponds to the frame, it does not matter
#raw 0x2b
#raw 0x18
#raw 0x29
#raw 0x18
#raw 0x4
#raw 0xfe
//during switching on//off, turning off the fountain, it is desirable that its state can be changed
Last edited: