So, uh, now what?

Need help with an engine or coding not on the list? Need help with a game or the website and forums here? Direct all questions here.
User avatar
Jesusfreak
Posts: 231
Joined: Mon Jun 08, 2009 1:43 pm

Re: So, uh, now what?

Post by Jesusfreak »

Ok, next I was thinking I should add an enemy that fires back at you. How would I create an object that intentionally targets another object (ie, the player)?
Image
_-= Official Noob Label -=_
For those with self esteem like mine =).
User avatar
Warriorccc0
Posts: 92
Joined: Thu Jun 18, 2009 5:37 am

Re: So, uh, now what?

Post by Warriorccc0 »

There should be a action that lets a object move towards another object, should be able to put that in the create event with the speed you want.
User avatar
Jesusfreak
Posts: 231
Joined: Mon Jun 08, 2009 1:43 pm

Re: So, uh, now what?

Post by Jesusfreak »

Ok... how do I make it create an object randomly at a random location?

Ah, I've got an idea, what if I just made a few invisible objects that went through everything except walls and eachother, and had the game create the thing every time a pair of them collided?
Image
_-= Official Noob Label -=_
For those with self esteem like mine =).
User avatar
Sakar
Posts: 520
Joined: Thu Apr 23, 2009 2:59 am

Re: So, uh, now what?

Post by Sakar »

Or you could also create an object, use Move Fixed to make it start moving in a direction, and Jump To Random to spawn it in a random spot. For spawning it at random times you can have a Chance check and if it is successful then spawn the object, otherwise do nothing :)
User avatar
Jesusfreak
Posts: 231
Joined: Mon Jun 08, 2009 1:43 pm

Re: So, uh, now what?

Post by Jesusfreak »

Hmm, yes, that would work too, but what action would I use to tell it when to be created? Is there a timer function or something I can use?
Image
_-= Official Noob Label -=_
For those with self esteem like mine =).
User avatar
Warriorccc0
Posts: 92
Joined: Thu Jun 18, 2009 5:37 am

Re: So, uh, now what?

Post by Warriorccc0 »

use the chance check on a instance create, for the x and y spots use "random(room_width)" and "random(room_height)", respectively.
User avatar
Jesusfreak
Posts: 231
Joined: Mon Jun 08, 2009 1:43 pm

Re: So, uh, now what?

Post by Jesusfreak »

That... doesn't answer my question at all o_O.

What do I put HERE?
Image
_-= Official Noob Label -=_
For those with self esteem like mine =).
User avatar
Warriorccc0
Posts: 92
Joined: Thu Jun 18, 2009 5:37 am

Re: So, uh, now what?

Post by Warriorccc0 »

Create event? Assuming your talking about the randomly spawning.
User avatar
Jesusfreak
Posts: 231
Joined: Mon Jun 08, 2009 1:43 pm

Re: So, uh, now what?

Post by Jesusfreak »

Ok, tried it, the "Create" event didn't do anything... I think "Create" event makes the event trigger when the object is created, which it hasn't been created yet... hmm...
Image
_-= Official Noob Label -=_
For those with self esteem like mine =).
User avatar
Warriorccc0
Posts: 92
Joined: Thu Jun 18, 2009 5:37 am

Re: So, uh, now what?

Post by Warriorccc0 »

Well ya, what way are you trying to do?

If your doing it my way, then you need to just use some kind of controller object.
Post Reply

Return to “Advanced Help and Support”