Main Menu
  • Welcome to The RPG Maker Resource Kit.

Useful Scriptlets

Started by modern algebra, August 12, 2007, 03:30:15 AM

0 Members and 1 Guest are viewing this topic.

Kokowam

I guess I understand this. Is it to remove the need to use an extra lines of code to set multiple attributes to a certain thing and remove any "nil" errors? XP

Erk64

I have a question about the script that lets items teach skills to party members...

Is there a way to make it so it will work on certain party members, but not others? Or only certain classes, if that makes it easier.
[spoiler=My Game Recommendations] 1) Demon Gate --- A great game with a terrific character-relationship system, an engaging story, and plenty of secrets and options for players who wish to be good/evil.
http://www.raizap.com/demongate/

2) Midnight --- A survival-horror game created with RPG Maker XP. Combat plays out in the smoothest running real-time battle system I have seen yet.
http://rmrk.net/index.php/topic,23239.0.html

3) The Healer --- A charming game with beautiful mapping and a fun battle system. One of the few games to use a healer as a main character, and so far it's pulled off well.
http://rmrk.net/index.php/topic,23524.0.html[/spoiler]

modern algebra

No, there isn't currently, I can add it in if you like.

Zeriab

Sorry for the long response. Forgot >_>
I has indeed made to prevent nil errors, or rather make it easier to prevent nil errors.
There can still be errors however and you should not use this way to declare methods with nil as their default. In that case it will be more efficient to use attr_accessor instead.

You can still get errors if you try to do something like this >>2 + "Hello World"<<
For example if the default value is set to 2 and you try to add "Hello World" to the default value.
Still, it should make scripters more aware of the problem.

I personally have an easier time looking over the code and checking the default values than if you have to write the methods out in the normal way.

modern algebra

Update:

Added Stop Animation Actors and removed Skill Teaching Items, as that is now part of the broader script located in the database.

Zeriab

Could consider merging my Little Module add-on into this topic?
I think it fits into the topic since you have not said 'my useful scriptlets' ^_^

modern algebra

That's a good idea. I'll have to rearrange the topic a little bit, but making it a public topic sounds like a good idea. I like that module addon a lot by the way. I think I might be overusing it at times :P

Zambaku

I can't get the custom death to work. I made a common event with the following in it:
@>Conditional Branch: [Character name] is [Knockout] inflicted
@>Change State: Entire Party, - [Knockout]
@>Transfer Player: [Map ID] (yadayada), Down
@>
: Branch End
@>


Perhaps it's wrong?

modern algebra

Well, make sure you set that common event ID as the one the script uses.

Change:
      $game_temp.common_event_id = 1

to whatever ID of the common event you made is.

mattehdeh

#34
Hey there, I'm new here but I've already put this script in and I'm just wondering if there is any way to make it so that actor/environment interactions depend on whose in the lead. Say, a door only opens to a certain character. Any assistance would be appreciated. <3

EDIT: Sorry, I was a bit vague. My question is related to the Change Leader Script.

Zeriab

Try playing around with putting the following code in the script part of a conditional branch: (009 bad, 9 good)
$game_party.actors[0].id == 42