[RESOLVED] quick rgss or event question?

Started by nathmatt, March 19, 2008, 03:38:10 pm

Previous topic - Next topic

nathmatt

March 19, 2008, 03:38:10 pm Last Edit: July 25, 2008, 05:06:39 pm by Blizzard
is there a way to change events name when say var=1
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Fantasist

I think there is. Try this:

module RPG
  class Event
   
    ID = 1
   
    def self.name
      if $game_variables != nil
        nm = case $game_variables[ID]
        when 1 then 'blah'
        when 2 then 'blah2'
        else
          @name
        end
        nm
      end
    end
   
  end
end


set ID to the variable ID. Place it anywhere above Main.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




nathmatt

Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Nortos

u dnt need to just when variable number 1 atm is set to 1 it is called blach and when number 1 is set to 2 it's called blah2

Fantasist

Yes, it's a configuration. Make a nice extension to work with multiple variables if you HAVE to use the feature more then once at a time.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




nathmatt

March 20, 2008, 03:31:05 pm #5 Last Edit: March 20, 2008, 03:36:22 pm by nathmatt
???  so how does this change an event on the maps name for a abs
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Fantasist

You just set up the name(s) in the config. ID is the id of the variable you want to change to change the name. It's like this:
when variable with id (ID) is 1, then name is 'blah' (or anything you like)
So put this script anywhere above main and just change the variable in-game.

...but there's a catch to this I overlooked. The names of ALL the events will change when you change the variable. So it's not right... I'll think of something else tomorrow, I'm a bt busy atm and gtg, sorry.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




nathmatt

March 21, 2008, 04:14:55 pm #7 Last Edit: March 21, 2008, 07:08:18 pm by nathmatt
that alright i can wait just a sugestion put to tell it what events to change maybe do what bliz did with his eneies on his abs maybe make it if events name = \r
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Fantasist

1. Okay, this is confusing. The purpose, what exactly do you need this for? You're using some sript which displays event names on map, and you want to change the name real-time during gameplay?
2. I'm not that good in this area, actually I'm pretty bad. Be prepared for the situation that I might not be able to help you.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




nathmatt

actually im using bliz abs so with this type of script i could change almost anything by changing its name since thats what his abs looks at
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Fantasist

Oh... tough one... I guess I might not be able to help you. why don't you post this in the Blizz-ABS topic too?
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




nathmatt

Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

Actually that won't work. The name is checked only when the map is entered (otherwise it would lag). Changing the name of an event won't do anything. I suggest you use clone events and switches.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

nathmatt

Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

Yes, you simply use another event. Let's say you want an enemy to turn into a lifeless object. Instead of changing the name, you simply turn on a switch that makes the enemy vanish and the object appear. You can simply use event switch preconditions for that.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

nathmatt

yea but ther problem there is if u have to many dummy events it lags i tryed that once tried to do that and use the trade event to but it always freezes on me
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

March 26, 2008, 04:16:56 pm #16 Last Edit: March 26, 2008, 04:21:38 pm by Blizzard
It freezes? That's weird. Have you tried it on a map with just a few events? Maybe the freezing is not the fault of the number of events, but a bug in Blizz-ABS...

EDIT: Alright, how about the possibility to change the event's name in-game? This would be reset after re-entering the map, though.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

nathmatt

i would use it like a star oceon battle so the first event would  when hero touch teleport me to a map & change a varible to a number which would make my 3 event
a monster so all i would have to do is make a certain map for each type of terrain unstead of for each monster also is there a way on ur abs monster to make them where the will run at me then let me use the when hero touch condition
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

Yes, but making the enemy event code run by touch or by button was a bug in an earlier version, not a wanted feature. That's why I removed it.
Hm, I think it's possible to figure something out that should work if you are able to use renaming commands together in a parallel process. Or maybe somebody wants to make a plugin for Blizz-ABS that allows a Star Ocean Battle System. xD
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

nathmatt

Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


nathmatt

even tho i really wouldn't need that could be done with conditon branch and events mainly haveing trouble with the name thing and the enemy running at me when i get in a certain range to teleport me
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

Wouldn't it be a better idea to use normal events for the running events instead of enemies?
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

nathmatt

Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

Simply use event that move toward the player if the player is within range. You can store the x and y coordinates into variables and compare them.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

nathmatt

March 27, 2008, 02:32:49 pm #24 Last Edit: March 27, 2008, 02:39:49 pm by nathmatt
k ill try that

k how do i compare them
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

You can use the "Operate variable" command to store values into variables. Simply compare their difference with some values that you need. Use conditional branches.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Fantasist

Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews