The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: da good king on July 31, 2007, 02:26:06 PM

Title: simple ?'s RESOLVED
Post by: da good king on July 31, 2007, 02:26:06 PM
man, how i wish there was a place that answered stupid ?'s like these, but:

1. what's the command you give the script to call a movie(.avi,.mpg,.wmv) file?

2. what's the value for a given party members position in the party (in terms of an integer)

3. what's the symbol used to mean "divisible by" in ruby script
Title: Re: simple ?'s
Post by: WcW on September 02, 2007, 03:10:54 AM
1.  Impossible.

2.  You have to know the actor's ID to access it in $game_party in the first place.

3.  None.  But there is

num = var1.to_f / var2.to_f
if not num.is_a?(Float)
  <do something>
end
Title: Re: simple ?'s
Post by: shaz on September 02, 2007, 08:21:26 AM
I think 2. you could loop through $game_party.actors and compare the name with what you're after, if you know your character's name.  Bit messy though.

3. Use the modulus operator
if var1 % var2 == 0
  # var1 is divisible by var2
end
Title: Re: simple ?'s
Post by: Zeriab on September 02, 2007, 09:35:19 AM
1. Way to bothersome to be worth it... though you can try using the script Behemoth has made: http://www.phanxgames.com/forum/forum_posts.asp?TID=3912
2. actor.index

shaz answer the third question ^_^