Resoyani

Villager
Member
Joined
Oct 10, 2022
Messages
5
Reaction score
3
First Language
Polish
Primarily Uses
RMVXA
This here is the script call for [show picture], yeah?
screen.pictures[ID].show('filename', 0, 0, 0, 100.0, 100.0, 255, 0)

If I wanted to replace the picture ID with the ID of the event running it, how would I go about it?
And I don't mean just typing in the number, I'd like to actually get the ID/make the process automatic
 

Heirukichi

Regular
Regular
Joined
Sep 24, 2015
Messages
1,502
Reaction score
655
First Language
Italian
Primarily Uses
RMVXA
Each event has an instance variable that holds the value for its own ID, it can be retrieved using @event_id.

So just use it wherever you need it.
 

kyonides

Reforged is laughable
Regular
Joined
Nov 17, 2019
Messages
1,893
Reaction score
966
First Language
English
Primarily Uses
RMXP
I've always thought it was a $global variable like...

Ruby:
$game_screen.pictures[ID].show('filename', 0, 0, 0, 100.0, 100.0, 255, 0)

Anyway, keep in mind that this approach has a terrible disadvantage, it only allows you to show ONE PICTURE per event. If you need to show another one, you'd be forced to use just another event to make it happen...
 

Resoyani

Villager
Member
Joined
Oct 10, 2022
Messages
5
Reaction score
3
First Language
Polish
Primarily Uses
RMVXA
I ended up figuring it out, the full thing is $game_map.events[@event_id].id (I didn't know about the .id part which is... a newbie mistake).
@kyonides I only plan for each event/character to display max. one picture anyway! And this way they'll all use different layers automatically so I won't have to rewrite the scriplet each time I paste it into a different event
 
  • Like
Reactions: Bex

nbgamemaker

Regular
Regular
Joined
Jun 17, 2022
Messages
227
Reaction score
85
First Language
english
Primarily Uses
RMMV
don't you need a "$"
 

Latest Threads

Latest Profile Posts

Idle.gif
did this a couple of days ago... along with a few other quick drawings.
ATT_Turan wrote on Guardinthena's profile.
My 4-year old is so entertained by my shirt that she's asked to see pictures and videos and get plushies.

The other day, she decided to randomly draw me an axolotl.
axolotl.jpg
A little snippet of what i'm working for the jam. The villain's name is Sant Aclos, and his Wife Mary Ximas. (10 points to whoever gets it)
1701487461330.png1701487534973.png

(Just wait until i get home so i give them the good ol' repaint threatment and you'll see)
In Hikari backstory his evil brother kills the king AKA their father and every villager in town. He then somehow framed Hikari for it when overheard by some other NPCs. What? By who? How? Why?
I will also update my logo temporarily for the holidays :)

Logo Happy Undermax.png

Forum statistics

Threads
136,673
Messages
1,268,615
Members
180,368
Latest member
BurgerKingHomeSurgeryKit
Top