Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
darkcieran

[SOLVED]A riddle wrapped in a mystery smothered in secret sauce....

Question

hopefully this ins't too noobish i want to add the the hero id of a character in my party to a variable. how would i do that? would i just do $game_variables = $game_party.actors[0].hero_id? or something else.

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Well, I'm not entirely sure but first off you havn't stated what variable you want it to write to. You would need something like this : $game_variable[?] = $game_party.actors[0].hero_id. If you try running that in an event it will give you the error "undefinable method "hero_id" so you will need to define "hero_id".

Share this post


Link to post
Share on other sites
  • 0

sorry for not being a bit more specific. say i have a variable called variable:[0011"hero id"]. would i then script it like so? $game_variable[11] = $game_party.actors[0].hero_id?

Share this post


Link to post
Share on other sites
  • 0

Well, it depends if you are going to be using "Script" in the 3rd Tier of eventing or are you actually putting it into a script?

Share this post


Link to post
Share on other sites
  • 0

thanks eros! now i have another question. how do i remove a character by their party position(ie$game_party.actors[0]) do i write it as $delete_party.actors[0] or something?

Share this post


Link to post
Share on other sites
  • 0

Because rgss counts each line as a separate command, the following must be placed as is:

 

 

index = $game_party.actors[insert party index here].id

$game_party.remove_actor(index)

 

You cannot send the second half of the first line as a parameter for the second line, or it won't fit on one line and the game will error out!

 

Remember, index should be from 0-3

Share this post


Link to post
Share on other sites
  • 0

thanks again eros! one more question. i'm looking for a way to turn a switch on who's id equals a set variable's value. (i.e Variable:[0001]=2 turn on switch 2) thru a call script. would i use $game_switch[?] = $game_variable[11].value = ON? OR $game_switch[$game_variable[11]] = ON?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...