Submit Your Article
RPG RPG Revolution
|
RPG Maker VX.com
RPG RPG Revolution
Board Guidelines
Help
Search
Members
Calendar
Arcade
Gallery
Chat
Search this forum only?
More Search Options
Welcome Guest
(
Log In
|
Register
)
Games
Resources
RPG Maker VX
RPG Maker XP
Scripts
Tutorials
Downloads
RPG RPG Revolution Forums
>
Scripting
>
Script Development and Support
How to make a variable control a number in script?
Options
HeartBorne
View Member Profile
Feb 8 2012, 10:13 AM
Post
#1
Group:
Member
Posts: 3
Type: Event Designer
RM Skill: Skilled
Hey guys
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?
Replies
Resource Dragon
View Member Profile
Feb 9 2012, 03:28 PM
Post
#2
Dragon has RAWR. So... RAWR.
Group:
Local Mod
Posts: 984
Type: Developer
RM Skill: Masterful
Rev Points: 95
@ai_level = $game_variables[5]
This should work fine, as long as you take out the @ sign, so it should be;
ai_level = $game_variables[5]
I see no reason why this wouldn't work, as long it is in the same script your already using it in.
You might have to predefine the variable, thus making it like this;
ai_level = 5
ai_level = $game_variables[5]
Or maybe doing this;
ai_level = 5
ai_level = $game_variables[5].to_i
This post has been edited by
Resource Dragon
: Feb 9 2012, 03:32 PM
__________________________
click me ->
Signup for Digital Hijinks!
<- click me
Posts in this topic
HeartBorne
How to make a variable control a number in script?
Feb 8 2012, 10:13 AM
Titanhex
That is a variable. It's a class variable. Yo...
Feb 8 2012, 10:26 AM
HeartBorne
I've tried this and it didn't work... ...
Feb 8 2012, 01:13 PM
ForeverZer0
Its an INSTANCE variable, not a CLASS variable. Cl...
Feb 8 2012, 08:49 PM
Philip
QUOTE (HeartBorne @ Feb 8 2012, 03:13 PM)...
Feb 8 2012, 11:20 PM
Resource Dragon
@ai_level = $game_variables[5] This should w...
Feb 9 2012, 03:28 PM
HeartBorne
thanks for your help but I still can't get it ...
Feb 10 2012, 06:51 AM
« Next Oldest
·
Script Development and Support
·
Next Newest »
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Forum Home
Search
Help
RRR Community
|-- Announcements
|-- Forum Feedback and Help
|-- Introductions and Farewells
|-- RRR Community Game
Production
|-- Submission Forum
|-- Project Showcase
|---- Dormant Projects
|-- Project Demos
|-- Complete Games
|---- RRR Community Reviews
Gameplay
|-- Theory and Ideas
|-- Level Design
|-- Map Packs
|-- Design Critique
|-- Gameplay Tutorials
Game Engines
|-- RPG Maker VX Ace Discussion
|---- RPG Maker Ace Tutorials
|-- RPG Maker VX Discussion
|---- RPG Maker VX Tutorials
|-- RPG Maker XP Discussion
|---- RPG Maker XP Tutorials
|-- RPG Maker 2000 / 2003
|---- General Game Engines Discussion
|---- RPG Maker 2000 / 2003 Tutorials
Scripting
|-- Script Tutorials
|---- RGSS3
|---- RGSS2
|---- RGSS
|---- GML / Other
|-- Script Submissions
|---- RGSS3-Submissions
|---- RGSS2-Submissions
|---- RGSS-Submissions
|---- GML / Other-Submissions
|-- Script Development and Support
|---- RGSS3
|---- RGSS2
|---- RGSS
|---- GML / Other
|---- Script Requests
|-- Event Emporium
|---- Eventing Tutorials
Art and Audio
|-- Resource Submissions
|---- Resource Requests
|---- RRR Exclusive Resources
|-- Visual Art
|---- Artist's Gallery
|---- Art and Spriting Tutorials
|-- Audio
|---- Audio Tutorials
Story and Plot Area
|-- Storytelling: Theory & Techniques
|---- Writing Tutorials
|-- Writing Critique
|-- Role Playing
|---- Role-Playing Archive
Chill Zone
|-- The Tavern
|---- Noteworthy Topics
|-- The Playground
Display Mode:
Switch to: Standard
·
Switch to: Linear+
·
Outline
Track this topic
·
Email this topic
·
Print this topic
·
Subscribe to this forum
Lo-Fi Version
Time is now: 18th June 2013 - 07:08 PM
RPG RPG Revolution
is an
Privacy Policy
and
Legal
Powered By
IP.Board
2.3.6 © 2013
IPS, Inc
.
Licensed to: RPG RPG Revolution