Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

RGSS Commands for Events

Jereth

Member

I've been trying to do events within scripts, with very little luck. Right now I've been trying to erase a picture (made with an event) in a script.

The picture number from the event is 22 and I've tried variations of scripts such as
Code:
$game_screen.pictures[22].erase
with no luck.

I tried calling the Interpreters (picture erase is command_235) but can't wrap my head around the migration from calling definitions in C to calling them in RGSS.

So my questios are, what is a script for erasing picture 22 and is there a way to call any of the interpreters so I can script my events rather than use the event editor.
 

Jereth

Member

NAMKCOR;217678 said:
try adding "return true" after that line
It probably does work, but unfortunatly the remove picture command is in the middle of a script and returning simply restarts the script.

UPDATE: Without returning since the picture removal is in the middle of the script, it doesn't work right. It waits until the script is complete to remove the image.

UPDATE2: Tried calling an event to erase the picture, same results, the image stays until the ENTIRE script is finish. How can I do a refresh mid way through a script?
 

Jereth

Member

I will probably be able to utilize that in the future, but for now, I just need to know why the picture doesn't erase until the end of the definition.

Also, I've strayed away from SDK scripts. The last time I tried to implement SDK into my game, I needed to revert bck to non-SDK as it over wrote almost every bit of my menu's animation enhancments, and the menu scripting in the SDK is nothing like the original menu code, so I would need to go through and rewrite my entire animted menu scripts, which is difficult to do the way SDK rewites the menus.

Here's an example of what I'm tryingto do, this example uses the Free_Windows script

Code:
  def Main_Scene_001_001
    s="What the hell...?
\\F You would start the game off with rain, wouldn't you?"

    w1=Command_Scriptor.new(s,124+16,300,608-124,128)
    w1.dispose
    Audio.se_play("Audio/SE/097-Attack09", 50, 50)
    [B]$game_screen.pictures[22].erase[/B]

    s="Ka-Ching?
\\F Ka-Ching!
\\F Nothing good ever comes from Ka-Ching."
    w1=Command_Scriptor.new(s,124+16,300,608-124,128)
    w1.dispose
   end

Everything here works fine, except it's not killing the picture until after the definition is complete. I'm not really intrested in an alternitave way to do it, I'd like to know how to get the way I have here to work, simply so I can know why different things are working or not working for me. Let's me have to ask less questions down the road.
 
The last time I tried to implement SDK into my game, I needed to revert bck to non-SDK as it over wrote almost every bit of my menu's animation enhancments, and the menu scripting in the SDK is nothing like the original menu code, so I would need to go through and rewrite my entire animted menu scripts

This is what you get when you directly modify the scripts instead of aliasing :)

You still should look into SS's Testbed. Just extract the relevant code if you don't like the SDK.
 

Jereth

Member

rataime;218102 said:
This is what you get when you directly modify the scripts instead of aliasing :)

You still should look into SS's Testbed. Just extract the relevant code if you don't like the SDK.

LOL, no that's what happenes when you get fed up, gut an entire class and rewrite it from scartch, useing a completely new set of definitions.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top