Discord
Login
Community
DARK THEME

Quick engine door collide

How would i code a door (in quick engine) that when you collide with it takes you to the next map?

You could use the quick engine map.Extract(door) function to take it like an object. Then you can use the collision function of mrLman (https://microstudio.dev/i/mrLman/gamesproglibrary/) and check if the player is colliding with the door. Finally if this happens, you change the map.

Sorry by my not very good english!

:)

Thanks! I will definitely be trying that! also your English is really good!

You are welcome!

do i just use this? also how do i use this? if thats fine checkCollision = function(x, y, map_name, map_draw_width, map_draw_height) local grid_x = floor((x + map_draw_width / 2) / (map_draw_width / maps[map_name].width)) local grid_y = floor((y + map_draw_height / 2) / (map_draw_height / maps[map_name].height)) return maps[map_name].get(grid_x, grid_y) end

Sorry by the delay :( this days I'm moving.

I'm making for you a simple project with the thing I said to help you.

Hello! Sorry again for the delay.

I don't know if you've already done it or not, but I'll show you how I've done it:

I've created the door as a Quick Engine object, and also apart another object to take care of the code part. Then I used Quick's collision function to which you pass two objects and it returns if they are colliding. This function is executed by the object I created for the code part (not the physics). In case the player and the door are colliding it executes the map change.

I've already written to you because I didn't want to delay any more, although the project is still under development. Anyway, I'll pass it to you here if you want to take a look at it:

https://microstudio.dev/i/Socks_Entertainment_Studios/dungeons/

I hope it helped you!

:)

I just finished the map change, I hope it's useful! :)

thanks so much! i'll be looking at it rn!

if you can could you come to my project and see if i did it right?

Sure, you can give me the URL or you can add me to the project! :)

there i've added you :)

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community