Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: fjurio on November 24, 2010, 12:50:30 pm

Title: Script Calls
Post by: fjurio on November 24, 2010, 12:50:30 pm
i´m looking for a list of "Script Calls" (command in the event...) for the rpg maker xp.

at the moment i need script calls that:
- change players movespeed, equipment, item, state, parameters and skills
- change enemys speed (Blizz Abs)
- change position, zoom and opacity of pictures

i had something in mind like the "script referenc" in the "babs-user manual" but with additional calls for the standard maker script.

ps: the calls should be compatible with the babs.

i hope i got it across.
Title: Re: Script Calls
Post by: stripe103 on November 24, 2010, 01:13:02 pm
- change players movespeed,equipment, item, state, parameters and skills
and
- change position, zoom and opacity of pictures
You can do all that with normal events. You don't need script calls for that.
For the player move speed, use the Move Route command. Equipment, items and skills all have a special command.
State and parameters I'm unsure. Don't have RMXP on this PC so I can't check.
For changing the pictures, just use the Move Picture event command
Title: Re: Script Calls
Post by: fjurio on November 24, 2010, 01:57:26 pm
i know that but i need this as a call script for make this changes based on variables. an example: movespeed + 1
also i need the call script commands in the combo system of the babs

edit: if it is to much work, the most importen call script command for me is "movespeed for the player" and "zoom, position and opacity of a picture"
Title: Re: Script Calls
Post by: stripe103 on November 24, 2010, 02:24:02 pm
Then I'm sorry, but I can't help you with that..  :(
But I can help you with the script call to change images.
$game_screen.pictures[picture_id].move(duration in frames, origin, x, y, zoom_x, zoom_y, opacity, blending)

origin can be 0 or 1. If it's 0, then ox and oy = 0. If it's 1 the ox and oy are equal to the half of the pictures width and height.
With zoom_x and zoom_y, 100.0 means 100%.
Title: Re: Script Calls
Post by: fjurio on November 24, 2010, 02:43:30 pm
Great. That´s exactly what was looking for. Thanks!  :haha:

Just the call for the movespeed are left.
Title: Re: Script Calls
Post by: stripe103 on November 24, 2010, 04:21:48 pm
I'll see if I have time tomorrow. Then maybe I can figure it out. If no one beats me to it, that is.
Title: Re: Script Calls
Post by: fjurio on November 24, 2010, 05:12:39 pm
Thanks.  :)

Just for addition. I allready tried the following calls. Non of them works:

$game_player.move_speed
$game_player.@move_speed
$game_character.move_speed
$game_character.@move_speed

and other crazy combinations
I also made a method in which i tried to set the variable @move_speed but the speed must be depended by something else.
Anyway. My knowlege about scripting is hardly limited. :/
Title: Re: Script Calls
Post by: ForeverZer0 on November 24, 2010, 08:11:58 pm
Spoiler: ShowHide
class Interpreter

  def speed=(speed)
    @event.move_speed = speed
  end
end

class Game_Character
  attr_accessor :move_speed # Not sure if his needed, check if it already exists first
end


In a script call, just type this:
speed = SPEED

It will change the move speed of the event it is called from.

I haven't tested this it all, just see if it works or not. I don't remember if Game_Character already has an accessor for move_speed or not. If it doesn't, this will also allow you to use the $game_player.move_speed = SPEED. If it does, likely none of this will work. Let me know, I can make this real quick sometime tonight if I mess around with RMXP.
Title: Re: Script Calls
Post by: fjurio on November 25, 2010, 05:43:14 pm
Sorry, it doesn´t work. Even though there isn´t an accessor.

By the way. What is the [Level++] and [Level--] for? Is this something like a reward for someone who helped me?
Title: Re: Script Calls
Post by: ForeverZer0 on November 25, 2010, 05:48:00 pm
I honestly have never known. What is it for? Anybody?
Title: Re: Script Calls
Post by: Blizzard on November 25, 2010, 05:55:59 pm
You can level people up or down if you have at least 10 posts. You can pretty much use it as you please, but people usually use it for rewarding for help, etc. since it is some kind of reputation system. I personally give it out for well done work or being really helpful to others or posting something hilarious. But you shouldn't get too much into it, it's not good if people start caring about it too much because it can cause problems.
Title: Re: Script Calls
Post by: fjurio on November 25, 2010, 07:08:54 pm
Ok, thanks for the explanation. I think its a good idea.

@ ForeverZero: After all your suggestion works. But sadly not with the BlizzABS what im gonna to use.
Title: Re: Script Calls
Post by: fjurio on November 28, 2010, 08:57:49 pm
Thanks for the help so far stripe103 and ForeverZer0. I hope you like your new level...   :P

Just one point is left. What should i do to chance "NORMAL_SPEED" in the blizz-abs with a call script? Should i make a accessor and how can i call the variable ($BlizzABS.NORMAL_SPEED?)?
Title: Re: Script Calls
Post by: ForeverZer0 on November 28, 2010, 09:24:29 pm
Use
BlizzABS::Config::NORMAL_SPEED
Title: Re: Script Calls
Post by: fjurio on November 28, 2010, 10:05:42 pm
Wow, quick reply.
This works just fine. But sadly again, it doesn´t change the speed ingame even if the NORMAL_SPEED is changed. But if i change NORMAL_SPEED before i run the game the speed is change.
So i think the BlizzABS::Config need a refresh after changing NORMAL_SPEED. How can i call this?
Title: Re: Script Calls
Post by: ForeverZer0 on November 28, 2010, 10:19:51 pm
NORMAL_SPEED is a constant.
Constants are, as the name implies, constant. They are not meant to be changed.
Title: Re: Script Calls
Post by: winkio on November 28, 2010, 10:25:07 pm
$game_player.normal_speed should work just for the player character.  You would have to loop through every character in the party to do it for the whole party.
Title: Re: Script Calls
Post by: fjurio on November 28, 2010, 11:01:29 pm
Finaly its solved. Thank you a lot for the explanation and the help.  :D
Title: Re: Script Calls
Post by: fjurio on December 08, 2010, 11:38:52 am
I have a new question about script call commands.

I get with "$game_map.events[ID].x" the x-position of the event with the ID in the brackets.
I don´t want to use the ID the whole time so i´m looking for something like that: "$game_map.events[SELF].x"

I´m pretty sure there is somethink like that, but i can´t find it.
Title: Re: Script Calls
Post by: ForeverZer0 on December 08, 2010, 12:07:08 pm
You can simply use :
@event.x


The @event variable is in the interpreter where the script call is evaluated, so it will not throw a NoMethod error. This way will only work for the event that the script call is in.
Title: Re: Script Calls
Post by: fjurio on December 08, 2010, 01:56:20 pm
Quote from: ForeverZer0 on December 08, 2010, 12:07:08 pm
The @event variable is in the interpreter where the script call is evaluated, so it will not throw a NoMethod error. This way will only work for the event that the script call is in.


That´s exactly what i want. Thanks.  :)

Edit: But it doesn´t work. Maybe i missunderstood you. This way only works for the event that is using this script call. Right?
Title: Re: Script Calls
Post by: ForeverZer0 on December 08, 2010, 04:32:21 pm
I may be wrong about @event. Look in the Interpreter (part 1), and look for an instance variable in the intialize or setup method that defines either "@event" or "@event_id". I can't remember off the top of my head which one it is. If it is "@event_id", use this script call to reference the event:

$game_map.events[@event_id]


or if is "@event", try:

$game_map.events[@event.id]


I can't see why that wouldn't work, unless it is something to do with BABS that I'm unaware of.
Title: Re: Script Calls
Post by: fjurio on December 08, 2010, 06:38:39 pm
The first one works. It works as well with the BABS.
Thanks.  :)
Title: Re: Script Calls
Post by: fjurio on December 09, 2010, 01:55:38 pm
Oh dear, i need another call script or something similar.

How can i disable the arrow buttons?
Title: Re: Script Calls
Post by: stripe103 on December 09, 2010, 04:18:23 pm
In the blizz-abs settings there are an option called like "Disable RMXP Controls" or "Disable default controls. Set that to true.
Title: Re: Script Calls
Post by: fjurio on December 10, 2010, 10:38:22 am
Sorry, by arrow buttons i mean the direction buttons. I wish to make it impossible to move for the player like the command in the combo settings "freeze input" it do.