Game Dev Contest
Join in on the Game Development contest with over $300 in prizes!
Banner Creation Contest!
Help the community out by creating your own version of the banner, and potentially having that as the main banner!
Resources
Check out our resources :D
Upgrade your account
Help out the community, and keep the website running and fully up to date by donating! :D

Need help with changing player graphics on event

GO TO ADMIN PANEL > ADD-ONS AND INSTALL ABSTRACT SIDEBAR TO SEE FORUMS AND SIDEBAR
Joined
Feb 18, 2019
Messages
9
Points
2
I'm having a bit of trouble with a feature in my project, I have events in form of chairs, when the player moves over a chair he sits on it, the problem is: I want the game to remember the players original charset and revert back to it when leaving, any idea on how to achieve that?
 

CT_Bolt

Global Moderator
Staff member
Resource Team
Joined
Nov 12, 2015
Messages
552
Points
248
RM Skill
Programmer
I'm having a bit of trouble with a feature in my project, I have events in form of chairs, when the player moves over a chair he sits on it, the problem is: I want the game to remember the players original charset and revert back to it when leaving, any idea on how to achieve that?
Using my "Change Event Graphic" Plugin this can be done pretty easy.

Change Event Graphic Plugin:

Once you've got the plugin installed. In the chair event use the following script to "remember" & change the player graphic:
JavaScript:
$gameVariables.setValue(1, $gameParty.leader()._characterName);
$gameVariables.setValue(2, $gameParty.leader()._characterIndex);
changeEventGraphic("player", "!Flame", 4, 2);
To turn them back use the following script:
JavaScript:
changeEventGraphic("player", $gameVariables.value(1), eval($gameVariables.value(2)), 2);
Tada! Should work nicely for ya. Let me know how it works for you. (cute)
 
Joined
Feb 18, 2019
Messages
9
Points
2
I'm having a bit of trouble with eventing it I think, I get the character to change graphics, but not changing back, how would you set it up?

I did this, probably all wrong, heh:
8141

8142
 
Top