@IceSage - Items have an effect tab right? There you can set things like HP recovery and state removal... I do believe you can put there more than 1 effect, so you can set it to remove Death State, then Recover HP afterwards...
This way, the item would handle both revive and recovery by itself, no need to call for a skill
exactly what I said... I think it's more about the spell thing, after a short look into the rpg maker I could not find the event command to force the character to use a spell.
More than 1 effect is possible to add, yeah, but more than 1 scope for an item/skill is not possible without custom scripts.
uhm.. I feel a bit stupid right now at testing some maps with pictures for sunlights and overlay and so on...
do I have to erase every picture on the map when I'm leaving the map with a teleport??
If you have used event commands ('Show Picture') for those pictures, than yes.
thanks, after some searching in this forum, I found a thread where Shaz and Engr. Adiktuzmiko answering that. this is... somehow a bit stupid as the old rm2k3 doesn't behave this way, a bit confusing for me 😳
I thought the ID for the pictures just were for on which "layer" the picture is shown, like picture with ID 2 is over picture with ID 1 if the pictures are overlapping somehow... well.. have to rethink some things..
/E: oh, and do I have to erase them before teleport command or after? on some maps it works on others not and I have no clue, if the maker erase the pictures on the previous map if I teleport first or the maker thinks now to erase the pictures on te current map after teleport...
Hey,
I've been searching around for ages and cant find a legitimate answer anywhere, so I figured I would ask here and hope for the best *fingers crossed*
What is the best way to pack a pointer to an unsigned long integer?
What I have been using is
# To Pack it up variable = [0].pack('L!')# And, to unpack;variable.unpack('L!')This seems to return inaccurate results, which leads me to believe im packing it incorrectly. Note, I also tried to pack in other types such as 'I' and 'L'.
@Dekita
It seems correct to me... can you show some examples of this inaccuracy?
Well, its being sent to a dll that alters the value stored within...
It goes somewhat like this...
def method(data) variable = [0].pack('L!') # Perform dll call that alters the value of variable to a number. variable.unpack('L!').first # < should hold data equal to value obtained from dll call endHowever, the value being returned is inaccurate. I have been searching over all kinda google all day with various questions ranging from semi related to completely unrelated. :/
I know that the value being returned is inaccurate, because i know what the accurate numbers are and the two dont add up. (note, tis seems to only occur when the variable is being set to a larger number then 8192) and its really frustrating me.
The only thing it can be is the way i packing it, cause the issue of the dll incorrectly chainging the value is nowhere to be found.
This can be really frustrating indeed =\
On the dll side, you are declaring an unsigned long pointer to receive the data, right?
Have you tried to use an int instead?
If you send a pointer to an empty string, can you read correctly the values the dll writes after calling it? Something like:
variable = " " * 4
Also, 8192 is 0b10000000000000, so there's something going wrong when your number hits the 14th bit. I'm not sure on how to do it, but I would investigate from this fact.
I hope something helps!
Folks, can we please start using this thread for its intended purpose? I have already indicated that one recent question here does not belong in this thread, yet its discussion has continued over more than one page and is still going on. The question about needing to erase pictures before leaving a map has NOTHING to do with script support. This is not a "any question I have goes here" thread. Please start posting in the right place.
The Shazonator has spoken !!
@Khas ~ the dll is anticipating "A pointer to an unsigned long integer variable that receives the number of available bytes". During the call to the dll, I am passing a 'p' parameter. I tried with an empty string as you suggested ~ the console printed the reply value to be a little love heart :/
hmmmmm...
Just tried by setting an actual DL::CPtr and allocating some official memory for the task ~ which also prints out the little love heart thing :/
I want to make an event in the Game_Interpreter that uses the wait command, however, naturally the wait method keeps the character and Input stop because of this:
def wait(duration) duration.times { Fiber.yield } endHow can I make a wait function in the Game_Interpreter that does not make the character stop?
If you Activated the Event with Action Button, just activate a Switch for a Seccond Eventpage.
That Eventpage must be on Paralell, thatway you are now able to execute Wait Commands and other Code,
and the Player is still able to run around on the Map again.
Sorry iam no real Scripter yet^^, cant help with the Script Solution, but maybe this Helps somehow.
That is why I am in this thread, I want to know how to do this in scripting, not in events.
In Game_Interpreter you can't. That class executes commands/methods, it won't update them.
Depending on where you want to use your new method, you might make a working wait function in Scene_Map or Scene_Battle.
In battles you won't be able to act while a wait command is active anyway, so I guess you want this on the map. You can mess with the 'update' method in Scene_Map or Game_Map, make some counter there, decrease it's value by X on each frame/second/minute/etc, and do something when that counter reaches 0, or something similar. Tie it with a condition which will make this counter only activate when you call your new method, and you will get what you want, I guess.
Than, when you made your new method, you can make a shortened script call to use that method in Game_Interpreter. That is why Game_Interpreter is there, making shorter and understandable script calls if needed.
Those restrictions apply automatically during cutscenes while the expression $game_map.interpreter.running? returns a true value (e.g. while an event is running that is not a parallel process).
If you only want to lift the restriction of the players movement being blocked, look up the update method within the Game_Player class. If that expression is not used there, it is probably inside the move_by_input method (I don't remember the exact name of this method). I hope this helps, I can't look up the exact position at the moment as I don't have access to the maker.
However, if you remove that restriction, the player will be able to move during cutscenes, but will still ignore random encounters and won't trigger other cutscene events and won't be able to call the menu.
Hi Khas. I want to make a process where its just like the wait method but I don't want my character to stop. This is what I did in Game_Interpreter:
def create_momotaros(momo) momo_x = get_motion(0) @character_motion = NPC_TkboxWindow.new(momo_x, momo) @character_motion.visible = true @character_motion.update_pos(momo_x) wait(5) @character_motion.visible = false endAs you can see, I am creating a window that shows when I call that method on a scrip call. However, the window stays there not unless I make the window not visible or make @character_motion.visible = false. So, what I was wanting to achieve was to make a wait function (but I can still move freely), while the event processes, and after 5 frames, the window becomes false.
You are creating a new window whenever you call that method.
That means you don't want to "hide" the window, you want to dispose it, or else you will create a memory leak.
You can try doing this in your window class:
def update super @count = 5 if @count.nil? if @count > 0 @count -= 1 else self.dispose if self endendSo, add this update method for it.This will dispose the window after 5 frames. Increase the @count if you want the window to stay for more frames.