![]() Note: i will hurt the player as long as they are on the rocks. Now we will make the part where it hurts the player when they are on the rocks. When the player is on the rocks the terrain tag will be set to 1 and when the player is over the grass it will be set to 2. If you remember from the tileset we set the terrain tag of rocks to 1. Set it to Variable and the variable you just made. Create a Conditional Branch right under the Variable you just made. Now we want to setup how the rocks and grass interact with the player. ![]() Set the Operand to Character, Player's, Terrain Tag. Make a new event without a graphic and set the Trigger to Parallel Process.Ĭreate a control variables event and name it something like Terrain Tag. The next step will be to make the event to track what terrain tag the player is currently on and heal or damage the player. Hit ok on the database to ensure the tags are set. We are going to use rocks to damage the player and the grass to heal the player. Set the Rocks for 1 and the Grass for 2 like the example below. Open your database and go to tilesets and the Grassland tileset then click on Terrain Tag. For this demonstration we will be using the grass and the rocks. Few things I will be covering in this tutorial is healing tiles, damaging tiles.įirst lets set some terrain tags in the tileset editor. This tutorial is to teach you all the useful things you can do with the Terrain Tags. ![]() You'd have to define it outside of all other methods (but inside the Class), using def p(parameters) and if it is an alias of another method you would need to place the alias-defining line right above that def p definition line.Welcome to the Terrain Tag Tutorial. What is the method "p"? Where is it defined, and what does it do? Note that if you're trying to define a method alias called "p" for sarah_action_turn with this line, that's not how you do it. Since sarah_action_turn is equal to 1 at this point, you might as well be typing p(1), which makes no sense whatsoever to my eye. The second obvious issue I see is with your line: p(sarah_action_turn) It means nothing unless an instance of the class is created to take that property.) (Also, note that such as your is how you define a class variable - essentially, a property of instances that belong to the class. It's just kind of orphaned code, floating in the middle of nowhere. Without a Class, or an instance of that Class, there's nothing available to actually call and run that method. As an example, the gain_item method is part of the Game_Party class, and there is an instance of that class created at game startup called $game_party - that is why when we call that method in a common event we would use a structure like $game_party.gain_item(item, quantity) The most obvious issue I see is that this method is not defined inside of a Class, or if it is and you haven't shown it, then you are not using an Instance of that Class to call it. I realise this is super simple, but I can't find any good tutorials on this and the things I'm trying aren't working. How do I make Script Calls in common events worrrrrrrrk? Heck, I've even tried just asking it to or p(sarah_action_turn)īut no matter what I do, nothing comes up in my console. I've tried writing it with class and a new method How do I make that common event skill add 1 to the s_a_turn variable? Sarah_action_turn = then I make a common event that activates when a skill (let's say Strong Attack) is used. (Edit 2: This method is in the Game_Actor < Game_Battler class) [ Final Edit: Turns out it was a formatting issue on the script call side of things (thanks A Moonless Night for helping me with that!) combined with me needing to relearn about Public Instance Variables and their relations to classes.Īll sorted now and I'm on track to get what I want done done!įor the life of me I can't get my Skill Activated Common Events to do the script I want it to. ![]() Heya, so I've got some very basic questions about Common Events Script Calling:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |