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.

Changing Scripts Mid-Game \ Event Interaction Questions

Sooth

Sponsor

Hello folks,

My apologies if these questions are a bit obvious or betray my vast ignorance, but....

1. Is it possible to modify existing scripts during gameplay? Say, have events that run scripts to call existing scripts in order to change some numbers around.

2. I'm using a combat system based on interaction with sprites on the map itself, rather than calling a separate screen. However, there doesn't seem to be a conditional branch for events being in proximity of other events - not including the player. If such a thing existed, it would be an easy task to have "allies" who attacked monsters on the field, or just plain monsters fighting each other... or, say, traps that the player could set against the monsters.

Am I missing something, or how would I go about this? Is this doable without getting into scripts?

3. It seems like it would be doable to make the player turn away from a given event (such as with 'Set Move Route'), or move away from said event, but it doesn't seem available by the default interface. Is this easy to do?

Thanks,

- Kriss
 
1. Sure. You can change the value of a script's variables during the game most of the time, and there are usually comments in the script that tell you how to do that. In case there isn't, you should post it here and somebody will point out how to change the variable... it usually only takes on line of code from "Call Script".

2. You will need a script for that. Like this one: http://rmvxp.co.cc/thread-305.html?highlight=view+range

It's not as straightforward is it may seem, though. There are evented ways to do such things, but not in a big scale.
 
The way I've always done it is to add new Interpreter methods, I dunno if that's the right (or a good) way to go about it:

Code:
class Interpreter

  def my_new_method

    #hello I am a script

    # ...

  end

end

Then to call it, in an event:

Call Script: my_new_method
 

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