PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > General Chat > Archive

Archive Old threads that serve no purpose are here.

Reply
 
Thread Tools Display Modes
Old 13th April 2015, 06:24 AM   #1
PokeballGO!
#150
 
PokeballGO!'s Avatar
 
Join Date: Apr 2015
Posts: 27
PokeballGO!
Unhappy XSE scripting help: Hiding a sprite until an event

I hope im not posting in the wrong place, but im back with another XSE event dilemma lol

So i have a script written where a rocket grunt tries to take oaks parcel away once you are leaving viridian city at the top of Route 1. Everything works perfectly, the only thing im having trouble with is trying to figure out how to make the grunts sprite be invisible on Route 1 until the parcel is in hand and the script is activated.

Ive tried setting the OW sprite as Hidden[3F] ((Hidden[0C] resets the game)) with showsprite and spritevisble cpmmands but neither work. The event plays, but no sprite that way.

Any suggestions?

****************************************
Here's the script:

#dynamic 0x802A82
#org @start
lock
faceplayer
checkitem 0x15D 0x1
if 0x0 goto @nop1
compare LASTRESULT 0x1
if 0x1 goto @heystop
end

#org @heystop
fanfare 0x0112
msgbox @heystopthere 0x4
closeonkeypress
applymovement 4 @rocketmove1
waitmovement 4
msgbox @giveme 0x4
closeonkeypress
goto @rocketbattle
end

#org @nop1
nop
release
end

#org @rocketbattle
trainerbattle 0x3 0x2 0x0 @winbattle
goto @beaten1
release
end

#org @beaten1
msgbox @beaten 0x4
closeonkeypress
applymovement 4 @rocketmove2
waitmovement 4
hidesprite 4
fadesong 0x0123
setvar 0x6004 0x1
setflag 0x1205
release
end

#org @rocketmove1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xfe

#org @rocketmove2
#raw 0x20
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0xfe

#org @heystopthere
= STOP RIGHT THERE!

#org @giveme
= ???: You better hand over that\nPARCEL if you know what's good for\lyou, brat!\p....\pGuess I'll just have to take it!


#org @winbattle
= This is not good...

#org @beaten
= ???: Aw, snap!\pThe boss is gonna be so cheesed.\nIve gotta get outta here!
__________________
"Humans may have created me, but they will never enslave me! This cannot be my destiny!" -Mewtwo
PokeballGO! is offline   Reply With Quote
Sponsored Links
Old 13th April 2015, 03:25 PM   #2
PokeballGO!
#150
 
PokeballGO!'s Avatar
 
Join Date: Apr 2015
Posts: 27
PokeballGO!
Default

*Note*

I've noticed that with the event of prof Oak in pallet, his OW sprite is set to look up, it has no script or any other values except a set flag 002C.

But obviously, hes not standing there when you walk by. Im going through his scripts in Pallet right now to see if i can figure it out.
__________________
"Humans may have created me, but they will never enslave me! This cannot be my destiny!" -Mewtwo
PokeballGO! is offline   Reply With Quote
Old 13th April 2015, 04:39 PM   #3
PokeballGO!
#150
 
PokeballGO!'s Avatar
 
Join Date: Apr 2015
Posts: 27
PokeballGO!
Default

So after hrs of playing around with it, ive finally figured it out. Of course it wasnt anything complicated, i just forgot that you can also hide a sprite by a setflag and not just with hidesprite lol i hate it when i get hung up for hrs on things and it ends up being so simple..

But, If anyone ever has this issue, i had to set a ground script on the bottom of the map of Route 1, that when stepped on, hid the sprite at the top of the map, and when the player comes back with the parcel it activates, showing the sprite using the showsprite command and viola. So easy, i just have to make it difficult lol

In this script, you step on the tile, rocket shows up, says some stuff, battles you and runs away. Heres the finished script.

#dynamic 0x805504
#org @start
lock
faceplayer
checkitem 0x15D 0x1
if 0x0 goto @nop1
compare LASTRESULT 0x1
if 0x1 goto @heystop
end

#org @heystop
playsong 0x0112 0x1
msgbox @heystopthere 0x4
closeonkeypress
showsprite 0x4
applymovement 4 @rocketmove1
waitmovement 4
msgbox @giveme 0x4
closeonkeypress
goto @rocketbattle
end

#org @nop1
nop
release
end

#org @rocketbattle
trainerbattle 0x3 0x2 0x0 @winbattle
goto @beaten1
release
end

#org @beaten1
msgbox @beaten 0x4
closeonkeypress
applymovement 4 @rocketmove2
waitmovement 4
hidesprite 4
fadesong 0x0123
setvar 0x6004 0x1
setflag 0x1205
release
end

#org @rocketmove1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xfe

#org @rocketmove2
#raw 0x20
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0xfe

#org @heystopthere
= STOP RIGHT THERE!

#org @giveme
= ???: You better hand over that\nPARCEL if you know what's good for\lyou, brat!\p....\pGuess I'll just have to take it!


#org @winbattle
= This is not good...

#org @beaten
= ???: Aw, snap!\pThe boss is gonna be so cheesed.\nIve gotta get outta here!
__________________
"Humans may have created me, but they will never enslave me! This cannot be my destiny!" -Mewtwo
PokeballGO! is offline   Reply With Quote
Old 13th April 2015, 06:55 PM   #4
Aperso
Puddleduck
PHO VIP
 
Aperso's Avatar
 
Join Date: Oct 2012
Location: its long since gone
Posts: 167
Aperso
Default

That there is Pallet towns map script.

For further reference, please look at the Map script which is found in the map header. this has a script that controls sprite placement and display as well as a few other things
__________________
Romhack.me ~ Aperso's account|PHO Forums ~ Aperso's account

I'll come up with something to put here later.
Aperso is offline   Reply With Quote
Old 13th April 2015, 11:00 PM   #5
PokeballGO!
#150
 
PokeballGO!'s Avatar
 
Join Date: Apr 2015
Posts: 27
PokeballGO!
Default

I tried it that way, but could never get it to work right :/

IDK, but i feel like im getting better at this little by little. Im actually writing my own scripts now instead of copying and pasting. Learning as i go, through A LOT of trial and error im starting to see there are multiple ways of doing scripts with different outcomes.

Now im trying to figure out how to do my own PC event. But i noticed there are no scripts on the pc. How does the PC work exactly?
__________________
"Humans may have created me, but they will never enslave me! This cannot be my destiny!" -Mewtwo
PokeballGO! is offline   Reply With Quote
Old 14th April 2015, 04:30 PM   #6
Aperso
Puddleduck
PHO VIP
 
Aperso's Avatar
 
Join Date: Oct 2012
Location: its long since gone
Posts: 167
Aperso
Default

The PC script is directly applied to the tile, which you would find in the block editor on A-map.
__________________
Romhack.me ~ Aperso's account|PHO Forums ~ Aperso's account

I'll come up with something to put here later.
Aperso is offline   Reply With Quote
Reply

Tags
event, hiding, scripting, sprite, xse

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:31 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc. User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).
Green Charizard Christos TreeckoLv100

"Black 2" by ARTPOP. Kyurem artwork by XOUS.

no new posts