What is the best way to go about scripting random combat?

Started by DollMaster, Tue 13/11/2007 05:00:29

Previous topic - Next topic

DollMaster

I am testing out script in a small crappy game...

I made 3 rooms.  Starting, room2, and the fighting room.

When you move to room2, there is a random chance that Ego appears and moves  towards you.  On collision, both are teleported to another room...the fighting room.  I can figure out the turned based battle on my own...but my problem is that I coded this for one room. 

I am not a good scripter and do not understand custom functions well.  But I believe I am supposed to use global code and custom functions to accomplish this.  The global code needs to 1)determine if monster is there, 2)choose monster, 3)place a monster on the screen.

Without going into specifics, how do I create custom global code, and how would I go about using it in my rooms?  I do not even know where to go about placing it in the global code script.


SMF spam blocked by CleanTalk