Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> How to make a variable control a number in script?
HeartBorne
post Feb 8 2012, 10:13 AM
Post #1



Group Icon

Group: Member
Posts: 3
Type: Event Designer
RM Skill: Skilled




Hey guys smile.gif
The subject is pretty much self explanatory.

I have this line to control the difficulty of the battle system i use:

@ai_level = 2

How can I make a variable control that number?
I've tried some things but none worked, anyone can help?
Go to the top of the page
 
+Quote Post
   
 
Start new topic
Replies
HeartBorne
post Feb 10 2012, 06:51 AM
Post #2



Group Icon

Group: Member
Posts: 3
Type: Event Designer
RM Skill: Skilled




thanks for your help but I still can't get it right...
Maybe its because ai_level can't be set to 0? IF that's the case could it be something like ai_level = variable + 1 ?

I am trying to do it on Gubid's tactical battle system (GTBS) if anyone has heard of it...

It uses

class Game_System
attr_accessor :ai_level

earlier in the script along with some other stuff and then:

alias gtbs_GS_init initialize
def initialize
@ai_level = 3
end

and much lower it returns with

def ai_level
return $game_system.ai_level
end

Am I doing something wrong?
Go to the top of the page
 
+Quote Post
   



Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 23rd May 2013 - 12:08 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker