Need to change origin point to players position?

Get help using Construct 2

Post » Sun Mar 09, 2014 2:40 am

I'm trying to sort of recreate the playstyle of the game "Realm of the Mad God". If you are unfamiliar with it, Google some footage of it. Notice that in the game, that when you rotate the "camera angle (?) " of the game it rotates around the player.

To do this, I need to be able to set the origin point to the players position when a certain event occurs, but there is no action for this?
B
5
S
1
Posts: 54
Reputation: 508

Post » Sun Mar 09, 2014 3:17 am

Think of it this way:
You can just rotate the background or choose to rotate a particular layer if you really wish.

Sounds like you want to rotate a layer or more.

To do this:
Event: Pick an Event, whatever will trigger your event.
Action: Pick the system object and "set layer angle".

Now when you do that special event, whatever is on that particular layer you picked should rotate. Of course your player can be on a separate layer so the player doesn't rotate.
B
19
S
7
G
7
Posts: 88
Reputation: 4,117

Post » Sun Mar 09, 2014 3:44 am

I was thinking of that and other things similar to it, but its not as simple as just rotating the ground or layer etc, because it needs to rotate with the player as the center point. It cant just rotate, otherwise it wouldn't work right, so it needs to have something along the lines of:
When A pressed: set origin point to Player.x,Player.y
B
5
S
1
Posts: 54
Reputation: 508

Post » Sun Mar 09, 2014 4:34 am

will this work for you?

having your player on a different layer, add an event and action

System/Every Tick || System/Scroll to Object (pick the player as the Object)
B
19
S
7
G
7
Posts: 88
Reputation: 4,117

Post » Sun Mar 09, 2014 3:34 pm

I don't know what that does, or what it is supposed to do, but no, it did not work. I just need some way to make the ground rotate with the character as the origin or centre point.
B
5
S
1
Posts: 54
Reputation: 508

Post » Sun Mar 09, 2014 4:59 pm

Here is a quick test - it appears to rotate around the centre of the screen so all I have done is set the scroll to on the player and added a large invisible sprite to use to limit the player from getting too close to the edge of the screen.

left mouse button and player moves towards mouse. q and e to rotate screen.

Very basic , needs work, but it appears to work...

good luck.
You do not have the required permissions to view the files attached to this post.
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Sun Mar 09, 2014 5:31 pm

as in the ground does not rotate but the player does?
Not what I intended but I think that might work? I can't atm but I will try it later
B
5
S
1
Posts: 54
Reputation: 508

Post » Sun Mar 09, 2014 7:15 pm

August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Sun Mar 09, 2014 8:51 pm

Yes! That is what I wanted! Thank you! Could you send a capx?
B
5
S
1
Posts: 54
Reputation: 508

Post » Mon Mar 10, 2014 4:21 am

Posted above in my first post as an attachment - can you see it?
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Next

Return to How do I....?

Who is online

Users browsing this forum: David181, evillair, Fenix18 and 45 guests