Description: Official subforum for LunaLua - an extension framework for SMBX Engine Version 1.3 (which a core of SMBX 2.0). Share your creations that require the use of LunaLUA. You may also share info/tutorials on how to use LunaLUA.
Moderators: Moderators, Semi-moderatos
I have in mind a lift which moves down automatically when the player stands above it and strikes the down key once. Also when the player presses the up key once, the lift goes up, both movements can move on a indefinite time.
Any suggestion where to start? I had no luck with it.
where to start? start by learning VB (visual basic) , it'll help you vith teascript
then don't hesitate to look at some scripts while reading the scripting manual the scripts example levels are there for that ^^
here some ideas:
for the first if (the base's condition)
use the player's y position to compare with the lift's y position (if the player's right above the npc)
ehen, do the same for the player's x position, (it the player's podition is between lift's x position + 32 and he lift's position - 32 (this would be a verry sall lift though) )
then, make the lift move if the up/down button's pressed
it's really poorly explained but i think it's doable
Added after 15 hours 3 minutes:
wihile reading the question one more time, i've got an other idea:
look with the collision script aera in the liquid/gravity section
first do a collision aera on top of the lift that will toggle on the script
then do others collision aera around the first one that will toggle off the script
the script will look at the key pressed and move the layer depending of which key is pressed (up will make the layer going up etc.)
Added after 26 minutes 49 seconds:
here's a pic to illustrate my second idea:
the red collision aera would toggle off the script and the blue would tuggle on the event
this solution could be problematic if you play in 2 player mode
Who is online (over the past 5 minutes)
Users browsing this forum: 1 guest