Post new topic    
Liquid Metal Slime
Send private message
Scripting Issues 
 PostWed Jul 17, 2013 5:17 pm
Send private message Reply with quote
I'm trying to make a slice collection show up if a certain menu is open. I'm checking whether the menu is open in an autorun script and if its true, it should put the slice on the screen. Unfortunately it doesn't work and nothing shows up instead.

Am I setting this one up wrong? Should it not be in an autorun script?
Cornbread Chemist
Liquid Metal King Slime
Send private message
Re: Script Issue with Menus/Slices 
 PostWed Jul 17, 2013 7:26 pm
Send private message Reply with quote
Meatballsub wrote:
I'm trying to make a slice collection show up if a certain menu is open. I'm checking whether the menu is open in an autorun script and if its true, it should put the slice on the screen. Unfortunately it doesn't work and nothing shows up instead.

Am I setting this one up wrong? Should it not be in an autorun script?


If you do it from an autorun script, that means the autorun has to continuously loop and keep checking for the menu.

I think it is better to trigger it a different way, but to suggest how I need to know more about the menu. Are you talking about the main menu when you press ESC? or some other menu started from a plotscript?
Liquid Metal Slime
Send private message
 
 PostWed Jul 17, 2013 9:23 pm
Send private message Reply with quote
Thanks James!

Currently it would be the main menu(ESC), though that could change in the near future.
Cornbread Chemist
Liquid Metal King Slime
Send private message
 
 PostWed Jul 17, 2013 10:13 pm
Send private message Reply with quote
Ah, okay, that isn't too hard. Check out this article: http://rpg.hamsterrepublic.com/ohrrpgce/How_can_I_run_a_script_instead_of/before/after_the_menu_comes_up%3F

But I really do need to add a simple script trigger for when you press the button to display the menu.
Liquid Metal Slime
Send private message
 
 PostThu Jul 18, 2013 1:48 am
Send private message Reply with quote
Thanks! I see what I did wrong now.
Cornbread Chemist
Liquid Metal Slime
Send private message
 
 PostThu Jul 18, 2013 5:35 pm
Send private message Reply with quote
I have another issue that is driving me crazy because I know it is something simple. Here is the script:

Quote:
plotscript,pattymad,begin
if (check tag (35) == false) then (
suspend player
suspend caterpillar
suspend obstruction
suspend hero walls
show textbox (250)
wait for textbox
walk hero (hero:NateHiding,left,15)
wait for hero (hero:NateHiding)
swap out hero (hero:NateHiding)
show textbox (1560)
wait for textbox
resume obstruction
resume player
resume caterpillar
resume hero walls)
else (
show textbox (251)
wait for textbox)
end


Basically, an NPC gets mad at a hero and they are supposed to run off the screen. However, the hero never runs or moves at all, instead just disappears instantly. Any advice would be much appreciated.

EDIT: Figured it out. Apparently you have to use find hero in a situation like this one. Works fine now!
Cornbread Chemist
Red Slime
Send private message
 
 PostThu Jul 18, 2013 6:02 pm
Send private message Reply with quote
These two lines:

Code:
walk hero (hero:NateHiding,left,15)
wait for hero (hero:NateHiding)


should be changed to:

Code:
walk hero (find hero(hero:NateHiding),left,15)
wait for hero (find hero(hero:NateHiding))


walk hero and wait for hero are looking for the hero's position in the party to be passed, not the hero enum itself. Putting a find hero around name will return that.

e: Missed it by that much!
Liquid Metal Slime
Send private message
 
 PostThu Jul 18, 2013 7:23 pm
Send private message Reply with quote
No worries! Grin
Cornbread Chemist
Display posts from previous: