Is it possible to set a location without a variable?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
J13
Regular
Posts: 60
Joined: Wed Jan 24, 2007 3:28 am
Location: Cambridge
Contact:

Is it possible to set a location without a variable?

#1 Post by J13 »

up to this point I've always used location variable's in my init block (I.e $ location4 = Position(xpos= 255, ypos= 515)) to create a location for my images/imagebuttons to go, I've reached a point though where i have so many of these variables it's barely manageable.
I was hoping to clear things up a bit by finding out how to define a position for images without using one of these variables for these functions

Code: Select all

show image at locationvariablex  
and

Code: Select all

$ ui.at(locationvariablex)  
I hope this makes at least some sense and I'd appreciate any help with this.

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: Is it possible to set a location without a variable?

#2 Post by monele »

Code: Select all

show image at Position(xpos= 255, ypos= 515)
Doesn't this work ? ô_o

J13
Regular
Posts: 60
Joined: Wed Jan 24, 2007 3:28 am
Location: Cambridge
Contact:

Re: Is it possible to set a location without a variable?

#3 Post by J13 »

Thanks for the quick response, that was exactly what i was looking for and works a charm in both cases :)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot]