have a bullet spawn a "portal" on the object it hits (SOLVED

Get help using Construct 2

Post » Tue Mar 04, 2014 5:28 pm

Hey, making a portal like game. Have a rough template made so far.

left mouse shoots first portal, right mouse second
touch first and spawn on second.

Just the portals i want them to spawn flush with the walls..or maybe a few millimeters out, but currently they spawn completely random

uploaded the game to my server here to see what i mean

First settings used were http://game.reconone.info/files/settings.jpg

the capx for what i currently have is on dropbox
https://dl.dropboxusercontent.com/u/146 ... 0tank.capx

Ive tried a few different options in the spawn list after bullet hits the wall.

Not sure if it would be best to have on one wall 5 smaller sections, and try to get each "portal" when it hits it to overlap? or if there is a way to format it to spawn directly with the x and y values

I know it needs a function to check if the second portal is spawned before entering first as it destroys the player, working on that so no worries

Thanks guys, love this program

EDIT 3-6-2014

Found out a way that works pretty well for me...anyone think of a cleaner way to do it? This is working for me now, so i can just add new levels as the portals are working how i want. Just need to now make a character instead of the tank, then make prettier backgrounds then mspaint hah


game with two quick levels so far

Last edited by sotak on Fri Mar 07, 2014 3:30 am, edited 2 times in total.
Posts: 17
Reputation: 332

Post » Tue Mar 04, 2014 5:44 pm

Are you using the image points as the spawn location?
Posts: 1,833
Reputation: 14,603

Post » Tue Mar 04, 2014 6:24 pm

I think so...from what it says I have it on a collision currently, so if the bullet/missile hits the wall object (invisible in the game) the condition shows "bullet | spawn | portal on layer3 (image point1)

I tried it to do on collision | create object | portal on layer 3 at (x, y) (tried it with choosing the x/y of the object it hit, but still not quite right.
Posts: 17
Reputation: 332

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests