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

Pages: [1] 2 3 ... 8
PlayMaker Help / Re: How to create Array of of other Arrays
« on: December 31, 2020, 06:27:31 AM »
Create new Array (String) and add all array names there.  :)

But the Array Lenght action does not accept Array (String), it should be Array (GameObject)

PlayMaker Help / How to create Array of other Arrays
« on: December 30, 2020, 03:57:49 PM »
I have a logic where I select an item from an array. However at the beginning of the FSM I want to switch between different arrays and use the same FSM loop to select from different game objects of the pre-selected array. Any ideas how to do that at play mode?

As per the attached image I'd like to be able to switch between the different arrays.
If I can create an array of arrays then I will just index the car class array in the main array and voila.

This is it! Thank you!

I have object A that I want to set as child to a prefab that I'm spawning at runtime using the set parent action.

However, Unity is not allowing that: "Setting the parent of a transform which resides in a Prefab Asset is disabled to prevent data corruption".

How to achieve the above without set parent action?

I have a grid with spawn points from 1 to 9.

I have a player car and AI cars. I'd like to spawn the player car and the AI cars on those spawn points in random order without repeating or overlapping. Any ideas how to approach that?

Thank you!

PlayMaker Help / Help with string/float formatting
« on: May 11, 2020, 12:27:00 PM »

I'm making a time manager that measures the difference between two time intervals. Best race lap time vs current lap time. So the time float is sometimes positive and sometimes negative.

When it's negative and I format the float with "{2:D2}:{3:D2}:{4:D3}" it shows 00m:-3s:-5ms. I want the minus (-) to be only in front when converting to string. Example: - 00:03:05, and not 00:-03:-05.

How to do that, I guess format or build string?

PlayMaker Help / Re: Meet several conditions before going to state
« on: May 04, 2020, 02:27:52 PM »
Thank you!

I'd like to ask for the best approach in the following case.

From state state 1 I want to go to state 2 but only if I have a string with the name "string1" and float that is over "800". Basically && in C#.

How to do that in Playmaker in a single state and combine a string and a float?
To do this:

Code: [Select]
if(x == z && y == z){
     //Do something

Thanks a lot, but may be I didn't give the best example.

I also want to get specific information from the currently selected car, like rpm and gear, so it's not only about sending. I want to to receive information without having to attach the same FSM over and over again to each car so I can reference the script on each car.

I want to find this script during runtime and having the control actions on game manger FSM that finds the selected car and that script.


I'd like to set a variable on a script attached to a game object that is instantiated at runtime. How to do that? It's easy if I have the object at the scene and it's only one object, but I want to be able to set a script on a different object with the same FSM.

car1 - prefab with script name "car engine" with tag "car"
car2 - prefab with script name "car engine" with tag "car"
car3 - prefab with script name "car engine" with tag "car"

If I drag the "car engine" script from car1, which I put in the scene to an FSM called "car throttle" I can easily set the car throttle variable at run time for this car1.

But I want to access this car throttle variable to the other cars as well with single FSM in the scene.

So I want to do the following:

1. Find game object with tag "car".
2. Store it in a player-car game object.
3. Set car throttle variable in the player car game object in the script "car engine".

How to do point 3 at runtime, given that I can choose any car?

Thank you!

Thanks a lot! :)


Well, I basically came to two possible approaches.

1. Broadcast a global event called "upgrade1, upgrade2, ..." and it's received from the active car.

2. Send event to the active game object, to and FSM with specific name, which game object is the active car stored in the current active game object from the array.

For the moment, I went with the first option.

PlayMaker Help / Change value of different GO from single UI button
« on: March 23, 2020, 01:24:43 PM »
I have a list of cars and I want to be able to upgrade components of those cars. Let's say power.

What would be the best approach to do that where we have one button called "power up" and we want to upgrade the only the current active car in the hierarchy list.

Thank you.

Official Action Updates / Re: Playmaker NGUI warning[SOLVED]
« on: October 10, 2019, 01:18:50 PM »
Solved.  :)

Official Action Updates / Playmaker NGUI warning[SOLVED]
« on: September 22, 2019, 05:13:25 PM »
I'm using the NGUI addon and I get this warning in all the projects. Would it be please possible to help with cleaning it?

Code: [Select]
Assets\PlayMaker NGUI\Scripts\Editor\NGuiEventsToPlaymakerFsmEventsInspector.cs(72,3): warning CS0618: 'EditorGUIUtility.LookLikeControls()' is obsolete: 'LookLikeControls and LookLikeInspector modes are deprecated.Use EditorGUIUtility.labelWidth and EditorGUIUtility.fieldWidth to control label and field widths.'

Pages: [1] 2 3 ... 8