Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - infinitum3d

Pages: 1 2 3 4 ... 6
Ask a Question / Re: Score increase per second question
« on: May 29, 2014, 04:16:40 pm »

Ask a Question / Re: Score increase per second question
« on: May 29, 2014, 03:21:18 pm »
That won't work because it will call the event every tick.

You have to use a boolean to control the "do every second" part.

I'll try to find a link that will explain.  Just a sec. (No pun intended)

No. The camera is stationary. 

So I use DRAWING to display my X of mouse, and separately to display (X of mouse + X of camera) and they are both the same.

That tells me that the X of camera does not affect the "recorded" value of the  mouse coordinates.

So my problem is still that when I create an actor at (screen height/2) it is not at 240. (Or maybe it is but it's not middle of screen)
If I use (scene height/2) it is not at 240.

even though my scene height and screen height are both 240.

If I use drawing to display screen height or scene height it displays 480.
If i use drawing to display (scene height/2) it says 240 but it's not the middle of the scene.
Same with screen height. It says 240 but it's not the middle of the screen.

My actor is 2x2 pixels. My origin point is center (default).


here is a bit info about how the camre works:
the range of your camera is the same size as you set yout game size to. your game size is the actual size of your screen. if your scene is the same size as your game (both in pixels), you dont need to do anything with your camera, since the camera will not move if it will result in showing an area outside the game.

...create the actor in the right location.
creating an actor has nothing to do with your camera co-ordinates, UNLESS you want to create an actor in the middle of your SCREEN (so not the scene), then you will need the camera co-ordinates.

ok. So it sounds like I have apparently sized something incorrectly? What I've find is that my 0,0 coordinate is approximately 64 pixels to the right of my left side. I actually have to use a -X to hit the left wall.

My Scene and my Screen must be different sizes?

Thanks! I appreciate all the help!

Ask a Question / Re: Actor move alone !
« on: May 29, 2014, 09:31:08 am »

I think the part we don't understand is "alone".

Are you saying that you want the actor to move by itself,  under its own control "on its own"?

or do you only want the actor to move and nothing else on the screen moves?

Please try to use a different sentence.

Ask a Question / Why doesn't Camera X/Y correspond to Screen X/Y?
« on: May 29, 2014, 09:22:16 am »
When my scene is created I set Camera X/Y to 0,0 but I still have to subtract the camera coordinates from my actor coordinates in order to create the actor in the right location.

I'm sorry but I guess I still don't understand the whole "camera" thing. Why is camera different than screen?

I understand why some people need a camera (I.e. For panning around the screen) but why doesn't a stationary camera match up with the screen?

Here's an interesting development. I have DRAWING set to show my MOUSE Y. I also have DRAWING set to show SCENE HEIGHT. And finally, I have UPDATING set to Create an actor when my mouse is clicked at Y=SCENE HEIGHT/2.

My SCENE HEIGHT is showing 480.
My actor is being created at 308, which is not 480/2 which is expected to be 240. My actor is only 2x2 so I would only expect the error to be 2 pixels at most.  I have not resized/tweened the actor.

I expect that the error is because I don't subtract the camera Y, however, the DRAWING clearing shows my mouse Y as 308 for the location of the created actor.

Any ideas?

Resolved Questions / Re: Mining mechanic not working?
« on: May 13, 2014, 06:25:01 am »
My first thought is to use a Boolean.   Maybe something like "is dirt actor attached". If yes, create new?

Awesome looking game btw.

No offense was intended. I'm stubborn and if I know I want to do something a certain way, I just want my question answered as asked.  That being said, once I've had a chance to test out the other suggestions, I almost always change to one of them. Like I said, I'm just stubborn. I genuinely appreciate any and all suggestions.
//-end thread hijack-//

I really hate doing this (because I hate when people do it to me) but have you considered an alternative like just creating the bullet in the layer under your actor at the actor center coordinates?

Then it appears to come out from in front of you no matter which way you face.


x/y (on screen) = x/y relative to the camera (x/y of self - x/y of camera)

Also realize that the coordinates are based on the graphic size, not collision box size.

Cheers! These were the two things I didn't know.  Much appreciated!

You could try something like this pseudocode;

If mouse X > (scene width/2) AND mouse is pressed
move right
If mouse X < (scene width/2) AND mouse is pressed
move left

The Actors and Scenes have a tab called Behaviors. To add a behavior you click the + on the left side. There are several categories of Behaviors you may have to go through to find what you're looking for.

Hope this helps.

Ask a Question / Re: Actor not dying after leaving scene!
« on: May 10, 2014, 03:21:32 pm »
What happens at the end of the scene? Do you transition to another scene? You could try to put a 'kill' conditional in the Actor's Updating Event

If <scene is transitioning>
kill self

x (on screen)

How are these different? I thought the origin point (0,0) was always the top left corner. Going right, x gets larger. Going down, y gets larger.

But then for the Actor it says the origin point is "Center (Default)".  I understand the need for options but Origin Point Custom does that. Shouldn't Default be Top Left?

Anyways, that's a bit irrelevant because I understand how to use the Actor origin. Where I'm getting confused is when the Actor Origin is set to Center (Default), and I try to create a new Actor at that same point, it is never correct.

Say I have a gun 32x32. The origin at Center (Default) should be (0,0) in the center. Or is it (16,16) in the center?

When I try to create a bullet at x of gun, y of gun, where will it be created? Should I use x of gun +16, y of gun +16? or x of gun + (width of gun/2)? or should I be using x-center, y-center? or x (on screen), y (on screen)?

I've tried all these things and none of the create the bullet in the center of the gun ?!

What am I doing wrong?

Thank you so much for the help!!!

Pages: 1 2 3 4 ... 6