Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I was just wondering if it's just me or there isn't an expression to retrieve the current gravity's angle?
This is not a complaint nor anything like that. I just want to be sure if I'm the only one missing this expression :).
I don't think there is such an expression (@Ashley ?).
Last time I used it I kept the value in an instance variable.
This possibly could have a spot in the todo list <img src="smileys/smiley1.gif" border="0" align="middle" />
Happy to help :).
Maybe you could use some non-behavior gravity ( Forces ? )
You could retrieve the gravity angle easily !
+ You could change the gravity ...
Can't change the gravity angle right now ...
Develop games in your browser. Powerful, performant & highly capable.
Well, it's no that I can't use a variable myself, it's just that there's no expression to retrieve the current angle. I think you didn't understand what I meant :).
And you do can change the gravity angle within the platform behavior.
I think it is by default 0 ...
Yeah, I just use an object instance variable, then set the gravity angle from this variable every tick.
Guys, it seems you don't understand the topic here. There's no problem in having a "custom" variable to set the angle (and later retrieve it). The reason for this topic is that there's an action within the platform behavior called "set angle of gravity". However there's no expression like "object.platform.gravityangle" to "natively" retrieve the value of the angle. In other cases, for every value (it seems) there's an expression to retrieve it.
I hope it's more clear now.