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 - curb47

Pages: 1 [2] 3 4 ... 15
PlayMaker Help / Re: Raycast logic mind-melt
« on: February 18, 2021, 06:20:45 AM »
Awesome! Thank you, that's great help.

I will set up your suggestion and get back to you.



PlayMaker Help / Re: Raycast logic mind-melt
« on: February 18, 2021, 05:50:13 AM »
Okay, I think I understand what you mean. I have one State with the raycast action & drawline etc on in and the raycast stores any (or none) hit objects, I could set that as an action sequence. Then at the end it spits out to a state that has a tag switch and wait (approx 0.1) on it, and if the tag switch is not player spaceship it loops back to the state with the raycast on it. If the tag switch is TRUE then it goes to a state that sends an event to activate the drain player health FSM, then back to the raycast state.

So essentially it's setting up a continuous loop around 2 or 3 states?

Thanks for your help, I can see the mist clearing.

PlayMaker Help / Re: Raycast logic mind-melt
« on: February 18, 2021, 05:11:43 AM »
Thanks RAVEN,

I've separated the raycasts to 2 different FSMs, and changed the hit detection to a tag switch, because I don't want the player's health to be drained if the lasers hit a passing asteroid or another enemy.

Now the logic gets stuck on the 2nd state (see picture) because the stored Hit Object doesn't refresh when the player leaves the line of fire.

In your suggestion, where do you add the Wait of 0.1-0.2? Do you mean untick any Every Frame boxes, set up a FINISHED-loop to Start, with the wait in there somewhere?

Thanks for your help.

PlayMaker Help / Raycast logic mind-melt [SOLVED]
« on: February 18, 2021, 04:08:06 AM »
Hello everyone,

I've got a situation with some logic that I can't work out, and my attempts always end up with the loop exceeding 1000 error...

I've got a Titan enemy, that is armed with 2 BFGs. When it fires the weapons the lasers are a continuous stream, like a hosepipe squirting water, not a pulse fire.

When your player spaceship is hit by the raycast, it needs to send an event to drain your health for each frame you are in the path of the laser/raycast.

And when you leave the line of fire, the 'draining health' event stops.

The problem I'm having is sending the Hit Event from the raycast stops the raycast. I tried sending the Hit Event to another state with the same raycast on in, that then registers the No Hit Event instead, and when this is triggered it sends back to the first raycast state. This is where the exceeding 1000 error hits in.

I actually think it's because I have 2 raycasts, left gun and right gun, on both states and perhaps I should separate them into their own FSMs?

Any tips would be awesome, thank you.


PlayMaker Help / Re: Move towards, but only once
« on: February 09, 2021, 11:15:21 AM »
How about using a combination of Look At, and Set Position (or Set Position Advanced).

On Set Position, on the appropriate axis (facing your destination via Look At) have a value of X (try a value of just 1 or 2 or larger for bigger incremental moves), and set the space to Self.

This will move the object by X, every time the action is called in the loop. 

PlayMaker Help / Re: Move towards, but only once
« on: February 09, 2021, 12:02:28 AM »
The 'send event' IS the next action. You can set up a series of Move Toward actions. eg:

Move Toward : Alien
Finish Distance : 100
Finish Event : spaceship....... Move Toward : Spaceship
                                           Finish Distance : 200
                                           Finish Event : planet....... Move Toward : Planet
                                                                                 Finish Distance : 100
                                                                                 Finish Event : die

etc etc etc etc

PlayMaker Help / Re: Array List compare
« on: February 08, 2021, 12:18:26 PM »
Hi ch1ky3n,

Thanks for your ideas.

Yes, the drone is a prefab. I set up the array deadDrone just as a way of being able to sort out drones that are still alive, as I need to be able to send events to the drones, telling them what to target - the mothership or the playership.

I have no particular reason for transferring the prefab to the array, rather than a bool or string, it's just my limitations of understanding.

In a nutshell, I'm trying to set up a little wave manager; one 'squad' starts out as a pooled prefab which consists of one parent containing up to 10 empty game objects arranged in a pattern. At GO, the children of the parent are put into an array, and used as spawn points, then, the FSM runs through the array and spawns a Drone (pooled prefab) at these points.

The drones stay as children, in formation, and the Parent (squad spawner) has a simple Move Towards action to target the mothership.

If the 'squad' of drones comes within range of the mothership, they all peel away one by one from their position; being de-parented, and using Look At Smooth, Apply Force, rigid body physics engine etc, and attack the mothership.

However, if the 'squad' of drones is intercepted by your player spaceship and attacked, the drones all spread out (subtle Explosion action), are de-parented, and now target your play spaceship and attack you.

After 10 seconds of attacking you (player), they turn their attention back to the mothership and swoop away.

You can chase them again, and when you shoot one, just before de-spawn the drone sends an event to all alive drones to turn their attention back to the player.

Does that make sense? I'm trying to establish a simple comms system between the drones, so an event can be sent to either target the mothership, or target the player.

Once all the drones of that wave are destroyed, the squad spawner is de-spawned.

So, maybe I'm over thinking this? Essentially, I want to create a dynamic list of the alive drones (pooled Prefab) that can receive a Send Event.

On this thread I posted a couple of days ago, there are some screen grabs of the set-up. It's relating to a different issue (solved) but it'll give you a clearer idea:

I hope that makes sense?


PlayMaker Help / Re: Lists and Arrays
« on: February 08, 2021, 09:28:48 AM »
Hi Alex,

Good to hear from you. Thank you for Playmaker, it's a wonderful experience.

I have Arraymaker, and have been using it, but my array set ups and logic are all fairly rudimentary and simple.

I posted another thread about my 'problem' , but essentially, I have an array list consisting of up to 20 game objects (enemy drones), and there are 2 events that can be sent to all the objects on the array: target Mother Ship and target Player Ship.
However, the enemies can be destroyed, of course, so I'd like to remove them from the list so they no longer receive either of the Send Events.

However, it's this removal form the list that creates a glitch, in that, sometimes the objects are being given the Send Event, whilst being shot at and destroyed the the list changes rapidly.

djaydino helped me out before, and I have a system in place that kinda works, but there are holes in the logic here and there.

I concluded I should set up an array for the initial spawn, and another array for when an object is killed, so all the objects exist dead or alive on the first array and only dead objects exist on the 2nd array, then I just have to work out how extrapolate form that, the objects that are 'alive' and send the events to only those.

I think.


Thanks again.


PlayMaker Help / Array List compare
« on: February 08, 2021, 07:59:13 AM »

I'm trying to work out how to get 2 Arrays compared for further actions.

When a bunch of enemies are spawned, they are stored as object in an Array:

Drones - drone 1, drone2, drone 3, drone 4, drone 5

Because of what I've been reading about, and experiencing, if I remove objects from an array it can cause weirdness, as the array list is created as a 'snap shot' of a bunch of objects and isn't meant to be dynamic.

So, when a drone is killed/destroyed it is not removed form the first array, it is added to another array:

deadDrones -

drone 2, drone 4 (for example)

The are a few things going on the game that mean an event must be sent to all of the drones that are still alive, so I need to compare the Drones array to the deadDrones array, almost like Drones-deadDrones = alive drones, and send the event to those.

Or can i just send an event to all objects in the array, and if they're Null/destroyed it will just ignore it?



PlayMaker Help / Lists and Arrays
« on: February 08, 2021, 02:07:48 AM »

I've been reading about Lists, compared to Arrays and think that Lists might suit my needs better.

From what I understand,  Lists are dynamic and it's easier to add/remove variables/objects without causing fiddly complications.

With Arraymaker , the actions are 'Array List ', which got me wondering, are they Arrays, or Lists? I'm figuring they're Arrays.

Is there an equivalent set of actions for Lists? Like, can I set up Lists, as easily as Arrays, using a different group of actions that I haven't discovered yet?



Oh I loved Virus. I had it on the Atari ST

Well that was a simple fix! Thanks djaydino!

Yes, setting velocity to 0, 0, 0 before despawn has done the job.


Yes, they are moving. The Parent has a Move Towards action, which targets the mothership, and when you start shooting the drones they de-parent, and Look At the player spaceship, and have a force applied, so essentially they chase you around.

I'll try what you suggest. Thank you.

Sorry for the confusing title...

I'm setting up an enemy wave manager, and I've stumbled into a problem that I can't work out.

I have a Prefab consisting of one Parent game object with 6 empty game objects as children, positioned in a hexagonal arrangement. These 6 objects are spawn points.

This Prefab is one 'squad' of Drones (enemies). When the prefab is first spawned, an FSM on the prefab creates an Array from the children, and spawns a Prefab of the drone at the position of the game object children:

However, when the second, third, fourth etc 'squad' prefab is spawned, the position of the game object children, and/or the actual drones is wrong. What I really don't understand is why the position of the empty game object children would have changed.

In the image below, is the 2nd 'squad' immediately after spawning. You can see there are 2 drones that have completely spawned in the wrong place, and you can also see that all the children (spawn points of the drones) have moved away from the centre of the Parent (selected Axis).

The two small grey spheres are just my visual reference points for the game object children / drone spawn points.

The Parent is always meant to be at the centre of the 6 spawn points.

Here is a screen grab of the Drone spawner, which is on the Parent:

Can somebody help me out here and tell me where I'm going wrong?

Many thanks,


PlayMaker Help / Re: Making a Back-up
« on: February 03, 2021, 10:35:33 AM »
Great, thanks.

Pages: 1 [2] 3 4 ... 15