Hi,
So I'm newish to RPG Maker VX Ace and the community, I just completed an online Ruby course, I feel fairly confident but I know I still have a lot to learn.
First of all I wrote this script as the start of a computer hacking script and while I'm not getting any errors it also doesn't run in order.
It starts by calling the name input window (it should call a message window) twice, then it displays one message containing "username please, password please, yay" on different lines. needless to say I'm lost.
def new #--- Working Perfect ---# users = {Cameron: "aklefn", Llyod: "janed"} #Hash for Usename/password user = ["Cameron","Llyod"] #array to sample name (randomization) name = user.sample{|n| n.to_str} #sample from array, set return to string pass = users.fetch(name.to_sym) #fetch value of name(as symbol) from hash #---Need Help With---# $game_message.add("Username Please") #send message (Duh) SceneManager.call(Scene_Name) ##Name input screen for actor 99 SceneManager.scene.prepare(99, 12) ## if name = $game_actors[99].name #Conditional to check username $game_message.add("Password Please") #if true ask for password SceneManager.call(Scene_Name) ##Name Input screen for actor 100 SceneManager.scene.prepare(100, 12) ## if pass = $game_actors[100].name #Conditional to check password $game_message.add("Yay") # Message if password = true else $game_message.add("sorry") #message if password = false end else $game_message.add("Sorry") #Message if username = false end endAlso problem number two is I have to put my scripts directly into the Game_Interpreter Script
I have this:
class Test < Game_Interpreter def initialize end def new end endend
set up under materials and when i try to call Initialize it returns an attempt to call a private method, when i cal New it just doesn't do anything( Yes when i was calling there was Valid code in the method) and returns no errors. the code i am using to call with is:
Test.new
But if i put the code directly into the Game_Interpreter Script and call Game_Interpreter.new or mixin Game_interpreter to my script and call self.new it works just fine.
Also I apologize for my formatting I've never been the greatest in that department.
any help would be appreciated
So I'm newish to RPG Maker VX Ace and the community, I just completed an online Ruby course, I feel fairly confident but I know I still have a lot to learn.
First of all I wrote this script as the start of a computer hacking script and while I'm not getting any errors it also doesn't run in order.
It starts by calling the name input window (it should call a message window) twice, then it displays one message containing "username please, password please, yay" on different lines. needless to say I'm lost.
def new #--- Working Perfect ---# users = {Cameron: "aklefn", Llyod: "janed"} #Hash for Usename/password user = ["Cameron","Llyod"] #array to sample name (randomization) name = user.sample{|n| n.to_str} #sample from array, set return to string pass = users.fetch(name.to_sym) #fetch value of name(as symbol) from hash #---Need Help With---# $game_message.add("Username Please") #send message (Duh) SceneManager.call(Scene_Name) ##Name input screen for actor 99 SceneManager.scene.prepare(99, 12) ## if name = $game_actors[99].name #Conditional to check username $game_message.add("Password Please") #if true ask for password SceneManager.call(Scene_Name) ##Name Input screen for actor 100 SceneManager.scene.prepare(100, 12) ## if pass = $game_actors[100].name #Conditional to check password $game_message.add("Yay") # Message if password = true else $game_message.add("sorry") #message if password = false end else $game_message.add("Sorry") #Message if username = false end endAlso problem number two is I have to put my scripts directly into the Game_Interpreter Script
I have this:
class Test < Game_Interpreter def initialize end def new end endend
set up under materials and when i try to call Initialize it returns an attempt to call a private method, when i cal New it just doesn't do anything( Yes when i was calling there was Valid code in the method) and returns no errors. the code i am using to call with is:
Test.new
But if i put the code directly into the Game_Interpreter Script and call Game_Interpreter.new or mixin Game_interpreter to my script and call self.new it works just fine.
Also I apologize for my formatting I've never been the greatest in that department.
any help would be appreciated