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.

Topics - curb47

Pages: [1] 2 3 ... 5
PlayMaker Help / Infinite looping background
« on: June 23, 2021, 02:03:12 PM »
Hiya, it's been a while since I was here. Been crazy busy with work/life.


I'm in the process of re-doing all my backgrounds, and decided to go for the low poly look, which means I have to re-work my FSMs.

Here's the game at the moment - it looks ugly as hell, so ignore that, I'm doing post-processing and lighting another time.

The background is made up of prefabs, which I got from the Unity Store, and have modelled my own elements in Cinema4D too. In this following image you can see I have 3 'depths' of background terrain, with the one selected (6 orange squares at the back).

The challenge is - when the space ship is whizzing left, the terrain prefab at the far right needs to move to the far left, and the opposite if the ship is whizzing right. This cycle needs to be repeated/looped as the ship travels further in either direction.

As a starting point, I have set the 6 terrain prefabs as children of an empty object, used Array List get Children of Game Object.

For moving right, I need to grab object at index 0, move it +1200, then use Array List Move to set the object at index 0 to index 5, for moving left, grab object at index 5, move it -1200, and set object from index 5 to index 0.

Each terrain prefab is 200x200, in the far background there are 6, so that equates to a move of 1200. In the mid background there are 5 prefabs, so the move will be 1000. 

I kinda get all this part, but I'm trying to think of a way of using Get Position (X value) of the Ship, so that every 200 units, it triggers the movement of the background terrain. Actually, triggering the movement of the terrain is no problem, it's getting the steps of 200 right that is causing me a headache.

Like, it sounds simple, but how do i trigger an event only when X goes up or down in steps of 200, infinitely. In fact, it would never actually be infinite because you can run out of fuel, and all the resources are positioned around the x=0  (+or- 500), but the principal is the same.

Any help is greatly appreciated.

Thanks in advance.

PlayMaker Help / Send Event at Timeline/Animation point/frame
« on: March 23, 2021, 07:45:28 AM »
I'm developing a little cut scene using cinemachine, and I'm animation a camera move. I need to send an event when the camera has finished the move.

I have the Animation timeline open, and I can set keyframes there, so I'd like to link the keyframes to an event somehow, like, when the playhead on the timeline hits a keyframe, send event.

I can see on the timeline there is a small button next to the Add Keyframe button that says Add Event, but i can't link that to any playmaker events.

Any help is, as always, greatly appreciated.


PlayMaker Help / Trigger on 2nd object in array not triggering.
« on: March 06, 2021, 02:31:28 AM »
Hello again,

So I've got another problem. Nothing new there then.

It kinda follows on from my other thread about Array Get Next not working. I've re-worked the array set-up, so the Array list is formed on the Sentient, and not the COMETS game object. This seems to work.

So... an Array is set, consisting of 3 objects. These objects are empty game objects that have a Sphere Collider set as Trigger. The idea is, when the sentient spawns, it grabs one of the objects from the list and moves towards to. When it reaches the object, the Trigger tells the sentient to get the next object on the array list and move to that one, etc etc. It just sets up a simple loop of the sentient moving around the scene.

As the game starts, the first target (named worldRed1) is grabbed from the array, and it works as expected...

And when the Sentient enters the Sphere Collider Trigger on target 1, it sends the event and grabs the next target (worldRed2) on the array list... All good so far...

The next target is then set in the Look At action, and is set in the Trigger Event action. This works.

And the sentient now moves towards target 2...

And now, the fail...

When the sentient enters the Sphere Collider Trigger of target 2, the Trigger event is not being registered/sent. The sentient just sits inside the sphere and continuously bobs around.

When the sentient enters the Trigger Sphere for target 2, it should send the 'go' event and grab the next object on the array, which is target 3 (worldRed3).

I don't understand how the system works just fine for the first target, but doesn't work for the second target. The logic is solid, and the game object targets are identical, just an empty object with a sphere collider:

If the logic works for target 1, it should work for the entire loop, right?

Please can somebody help me out here (again)... my brain is fried from all this logic problem solving.

Many thanks,



PlayMaker Help / Array List Get not working
« on: March 04, 2021, 02:49:42 AM »

I've got a problem with Array List Get.

I have my master control object (COMETS) which manages the spawning/waves of sentient beings.

Some objects (SpaceTargets) are put into an Array. These objects are just Empty Game Objects that the Sentients fly towards.

When the Sentients are spawned (pooled/spawned prefabs), the COMETS object is set on each one as a Game Object variable. All good so far.

Okay, now the fail...

When the Event is triggered to send the sentients whizz towards the SpaceTargets, the Array List Get is not working. I've double checked all my variables, and logic, and I can't see any reason why this is happening. I must be overlooking something but I can't figure out what it is.

Any help is greatly appreciated.

Many thanks,


PlayMaker Help / Smooth Look At 2D
« on: February 25, 2021, 03:18:01 AM »

Im the process of fine tuning a few things on my Titan enemy, and I've noticed something that is causing a timing problem.

My game is 2.5D, so all the objects and world are in 3D space, but the gameplay action happens on one plain in Z-Space, ie - nothing moves in Z-Space, it's all on the X and Y. I've used the Smooth Look At 2D action on the Titan enemy so it turns and faces the player spaceship when it is attacked, and when the Finish Tolerance is reached, it sends the event for the Titan to chase the player and start shooting it.

I previously used the non-2D version of Smooth Look At, but I don't like the way it flips the whole Titan around, whereas the 2D version rotates it nicely.

The problem I'm having is the Finish Tolerance is being ignored and the Event is triggering immediately, rather than waiting for the Titan to be facing the player spaceship.

Is there something wrong with using Smooth Look At 2D on an object that is in 3D space, with a Rigidbody, and not a Rigidbody 2D?

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 / 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?



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 / Making a Back-up [SOLVED]
« on: February 03, 2021, 02:47:33 AM »

I've been making back-ups of my project at regular intervals, but I wondered, it shouldn't be necessary to duplicate the entire game folder, right?

My project folder is currently at 10GB, which is obviously going to come down, and I wondered which folders within the project are the most essential in terms of making back-ups? I shouldn't have to make duplicates or artwork, and models etc right?


PlayMaker Help / Explosion / Layer Mask Confusion [SOLVED]
« on: February 02, 2021, 01:36:13 AM »

I hope you're all well. I'm confused. Story of my life.

I've got a bunch of enemy drones that are children of an object moving towards the Mothership. When you intercept them and started shooting them, they de-parent from the 'Move Towards' object and then target your player space ship.

When they de-parent they use rigidbody/look at/apply force physics to attack you.

So, at the moment the drones are de-parented, I want to add a moment of outward force so they spread out and then target your player spaceship.

I'm using the Explosion action, but I'm having problems setting the parameters on the Action. As there are no visualisations for the action I don't know if the Force should be 10 or 100, and the same for the Radius, like, what is the scale?

I can fiddle around with trial and error for Force/Radius, so that'll be okay, but the main misunderstanding I'm having is the Layer and Layer Mask settings.

I thought I should just have my Enemies on the Layer setting, but when I hover the cursor over Layer Mask, the little message pops up saying- Type: Int Array Layers to Effect, so I put it in there. I dunno.

At the moment, I'm not getting any result from the Explosion action, and I just wondered if somebody could please give me a push in the right direction, ie - tell me how to set it up?

Many thanks.


PlayMaker Help / Updating Unity & Playmaker
« on: January 27, 2021, 01:30:11 PM »

I thought I'd update Playmaker to the most recent version, and figured I may as well update Unity as well. I'm currently running Unity 2019.4.10, and I'm adding 2019.4.18 to the HUB.

What would be the best way to take my project through the Unity/Playmaker upgrade process?

I'm doing a chrono-sync backup of the project right now, and once that's done, is it simply a case of opening up the project in the newer version of Unity and then updating Playmaker from the assets store?

So, Unity 2019.4.18 with Playmaker 1.9.1.p1 - all good?


PlayMaker Help / Array List Get Next confusion
« on: January 26, 2021, 05:09:38 AM »

I'm having some problems setting up a reliable Array List Get Next FSM. I've found a thread on the forum which explains it clearly, so I understand what's going wrong, but I don't know how to fix it.

The problem is that the Array List Get Next action skips or misses some objects in the array, if the objects are de-parented and/or destroyed before the array get next list is complete.

Which is exactly what's going on in my Loop, the objects (enemy spaceships) can be shot/destroyed as the list is being run, and they are being de-parented, so the Array List Get Next fails to complete quite regularly.

Here's the Array List:

And here's the State/Actions in the Loop:

I have found a little work around; after the Finished event I put in a state which tests whether the Array is empty, and if not sends it back to the Array List Get Next state to finish it off. The problem with this is that it breaks the timing of the sequence, I have 10 enemy spaceships peeling off one by one from a pre-defined flight path, and it looks rubbish when the array list stops/checks for a moment.

So. How do I get round this? The other thread i found offers the outline of the solution, but I can't get my brain around it.

Here is the other thread:

Thank you in advance for any help.


PlayMaker Help / Another old problem - Raycast distance
« on: January 20, 2021, 01:32:59 AM »
Hi again,

I'm looking at old issues that I've brushed under the carpet for a while, so now's the time to clean them up...

I'm using Raycast to fire lasers, and with the spaceship in the centre of the screen the Raycast distance needs to be shorter when the ship is facing Up and Down. I really don't know how to tackle this, I thought there must be some Math that could take the rotation value of the ship and a Raycast length could be extrapolated from that value. Or something like that. I tried using Colliders but that looked rubbish.

This is kinda what I'm looking for, with the green Oval representing the boundary of the Raycast -

Thanks for your help, you guys rock.

PlayMaker Help / Move Towards - Fixed Update Issue [SOLVED]
« on: January 20, 2021, 01:03:16 AM »

I'm returning to an old problem that I never quite fixed. My game uses the 3D physics engine, in a 2.5D game environment, with forces, rigid body etc.

Some of the collectable items (Health Orbs, Energy Orbs) spawn at a location and Move Towards the play spaceship. These Orbs are not Rigid Body, therefore do not use the physics engine, so require a Fixed Update to make the movement smooth.

Playmaker adds a Fixed Update component to the object, but it's not giving very good results, it's still quite jittery. I was wondering if there's a 'Move Towards Advanced' type action, or any action I could add that will fix this?

Id had a similar issue with my camera movement a while ago, and I discovered the Get/Set Position Advanced actions on the Ecosystem which have worked brilliantly, so the solution is out there somewhere, right?

I've experimented with removing the Fixed Update component that was added, then adding it again manually, but that didn't make any difference, obviously.

It would be awesome to have a Move Towards Advanced action, or maybe there's a different combo of actions I can use, that utilises the Set Position Advanced action, that will give the same results?

Thanks in advance for your help.

Pages: [1] 2 3 ... 5