playMaker

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 ... 16
1
PlayMaker Help / Re: Infinite looping background
« on: June 24, 2021, 10:07:59 AM »
Not really, but mainly due to the nature of the different game styles. I can't use Colliders to trigger the prefab move.

I've kinda got it working, but need to refine it. I'll post here with my results.

2
PlayMaker Help / Re: Infinite looping background
« on: June 24, 2021, 07:10:23 AM »
I think I've cracked it. I'll mark SOLVED once I'm sure.

3
PlayMaker Help / Re: Infinite looping background
« on: June 24, 2021, 03:38:43 AM »
Hey Djaydino,

I found this tutorial that you did -


Any chance you could expand on this and help me out if you have any time?

Cheers,

J.

4
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.

Anyway...

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.

5
Share New Actions / Re: Cinemachine Support [ECOSYSTEM] [MAY 2020]
« on: March 23, 2021, 08:32:40 AM »
Thanks CraigZ & JeanFabre,

I'll look into this.

Jean- how do you mean, place triggers along the path? How can i place triggers along the Cinemachine Dolly path? I really don't see how that can be done?

Thanks.


6
PlayMaker Help / Send Event at Timeline/Animation point/frame
« on: March 23, 2021, 07:45:28 AM »
Hello,
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.

J.

7
PlayMaker Help / Re: Trigger on 2nd object in array not triggering.
« on: March 09, 2021, 01:41:54 AM »
Hello,

I tried the trigger fsm on the worldred objects and that seems to work, but has opened another set of problems.

You say Get Distance & Float Compare uses less resources than triggers? I'm surprised. I'll gladly use get distance, much simpler.

8
PlayMaker Help / Re: Weird Trigger behaviour... confused again!
« on: March 07, 2021, 01:40:15 AM »
Sorry... gotta bump.

Bump.

9
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,

J.

 

10
PlayMaker Help / Re: Array List Get not working
« on: March 05, 2021, 12:04:19 PM »
I tried setting the array up on the spawned sentient, but still encountering problems. Although this time I'm getting errors in the consol which is a good thing, because at least it gives a clue on how to fix it.

Problem is, I have no idea what it says...



Any idea on how to interpret this?

Thank you.

J.

11
PlayMaker Help / Re: Array List Get not working
« on: March 05, 2021, 02:47:56 AM »
Just to clarify, the Sentients are pooled/spawned prefabs.

These prefabs are having the COMETS object set on them immediately after spawn, by using Set FSM Game Object (which you taught me, many many months ago!):



Just to avoid any confusion, you can see the 'Prefab To Spawn' is 'New RedComet'. This is just the name of the prefab, but I'm calling them 'sentient' as the Spawned Game Object.

The spawned Sentient prefab can 'see' the COMETS game object, which has the array lists on it, so am I right in thinking that as long as the connection has been made, the Sentient should be able to access the array lists on the COMETS object?

You can see on this screen grab above, the spawned sentients are added to their own array list on the COMETS object. When you start shooting one of the sentients, as its health drops it sends an event to all sentients on the array list:



This action works just fine, so the connection is there.

12
PlayMaker Help / Re: Array List Get not working
« on: March 05, 2021, 02:14:49 AM »
I tried adding a Failure Event, which just goes to another State which also tries to access the same array list. This one also has a Failure Event which goes back to the first State, so a continuous loop if they both fail.

I was expecting to see this continuous loop happening, but it didn't, the flow went through to the next set of states. So, the Array List Get is not registering the fail? Or maybe the Array list isn't populated at the moment the action looks at it?

Maybe I need to add a Wait 0.5 somewhere in the mix?


13
PlayMaker Help / Re: Array List Get not working
« on: March 05, 2021, 02:02:14 AM »
Thank you, I'll check that out.

I did a little test and set up another simple FSM which tries to access an array on the same COMETS object, and I'm having the same problem. It's weird.



The logic should work, right?

14
PlayMaker Help / Re: Array List Get not working
« on: March 04, 2021, 01:05:02 PM »
Hiya,

Okay, thanks. Umm... what's a 'breakpoint' ?

J.

15
PlayMaker Help / Re: Array List Get not working
« on: March 04, 2021, 08:12:28 AM »
Hello.

Can I set a failure event just to loop around back into the same state, so it tries again to grab the item from the Array list?

I have no warnings in the consol.

The comets (now called sentients) are added to an array, but only to receive a Send Event by Name to Array List.

My naming convention is a bit confusing, because COMETS refers to the manager that deals with all the spawning of the sentients. The actual prefabs of the comets, I'm now calling sentients.

Pages: [1] 2 3 ... 16