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

Pages: [1] 2 3 ... 9
1
PlayMaker Help / How to send 3D gameobject to 2D UI location on screen??
« on: October 10, 2019, 08:05:53 AM »
Hi,

I need to send coins which my player is collecting to a specific UI location where my Coin Meter is. Currently I kind of made a workaround - I'm sending coins to the hidden gameobject which is roughly aligned to a position of UI Coin meter element. But it's wrong of course - the minute I have different resolution or different aspect ratio those positions get screwed..

Which actions you would recommend for converting worldspace coords to screenspace, and how would you recommend to do that? Thanks a lot in advance!

2
PlayMaker Help / Re: How to a store colliders under different names?
« on: July 26, 2019, 12:07:45 AM »
Thanks a lot Jean! Now I got it!

3
PlayMaker Help / Re: How to a store colliders under different names?
« on: July 25, 2019, 07:35:55 AM »
Thanks for this detailed explaining Jean! I appreciate it a lot! But what's not clear enough for me is how and where exactly do I actually specify whether I want to use FIFO or LIFO? For example how can I implement FIFO technic using Array List Get Next action? Which additional actions should I use? For example Array List Remove At (index) or do you mean some other action? Cos now it seems like I'm not using any of those concepts at all in my Array List setup.

Here's how I currently have it set up: I'm just looping through items in my Array list triggering events on each of them (without removing any first or last ones of them meanwhile), and when all items are processed from A to C and the Finish event is sent I'm forwarding it to the State where I have Array List Clear  action which just clears contents of my Array list and returns to the State where I'm checking if there are any new items added to the Array List Proxy.

Am I doing it wrong? What should I do to actually implement this FIFOs and LIFOs? Thanks a lot in advance!


4
Thanks a lot Djaydino and Jeanfabre!

I went with Djaydino's suggestion yesterday and it worked like charm! Thank you so much guys!

What I did is just like you both suggested, moved Moving of Coins towards CoinMeter logic on the Coins and it worked! Djaydino, I also enhanced it with the thing you suggested in my another thread about coins - I used Pooler and a holder which also works great and should be good for performance too! Thank you once again!

5
Yep, I tried delaying the loop cycle putting Wait action between loops but it’s not solving it either. Events I’m triggering on coins are lasting for 3 seconds, and if I put a delay of 0.1f  between triggering those long lasting events they will just stop executing once the loop is throwing away current stored Coin and grabs the next one to store it and trigger the next long lasting event on it.

I mean they just don’t have enough time to go through all the needed states inside of this long lasting events. Cos Coins on which those long lasting events are being fired on, are being stored and thrown away much quicker than it’s required to finish those long lasting events.

6
Hi, how do I quickly but consequently trigger long lasting events on multiple items in my Array List? Events that last, let's say, for 3 seconds each - but triggering those Events with tiny 0.1f delay?

For example, I have 20 Coins in my Array list, and I want to trigger a Global Event (move the Coin towards CoinMeter on HUD) which takes 3 seconds for each Coin.

If I will loop through the whole list storing the next item in the Array as GameObject in Result field, having triggered these long lasting event on each of the Coin in my Array - it will just loop through the list super quickly - triggering events that are supposed to last for 3 seconds. But since the looping is happening fast and GameObjects are switching quickly - it just cannot finish those long taking events on each Coin.

Of course, waiting till each Coin is reaching its final destination is not an option as it would take ages to send 20 or more coins to CoinsMeter. So basically what I’m trying to achieve is - nice chain of coins slowly traveling to Coin Meter in the air. How should I implement it? Please help, I'm really cracking my head over this for a few days already! Thanks a lot!

7
Oh, me stupid, figured out that I have to install Array Maker first before installing ArrayListIsEmpty2. I installed it and that action is installed smoothly. Thanks Djay!

8
PlayMaker Help / Problem with Array Get Next looping
« on: July 19, 2019, 08:35:51 AM »
Problem with Array Get Next looping

been cracking my head for a few days with this already. Here's the deal. I have two Boxes standing very close to each other. With each collision I'm placing them to Array, and with each loop event, storing them in CurrentCollider gameobject Variable in Array Get Next action. Each of these Boxes have FSM with Spawn Random Powerup Global Event trigger which does the following:

1) Spawning PowerUp prefab taking it from the PowerUp Pool
2) Parenting it to Player Character
3) Playing some simple scale bounce animation on PowerUp
4) Quickly moving PowerUp towards Player Character
5) UNparenting PowerUp prefab from Player character
6) Deactivating PowerUp Prefab and putting it back to the Pool

The problem is when I'm calling this SpawnRandomPowerup on the first Box_01, doing a loop in Array Get Next and calling SpawnRandomPowerup on the newly added and stored Box_02, all activity on Box_01 is being freezed on Step 3, resulting in Powerup just floating forever above my Player Character and what's even worse - staying parented to it not being able to return to a Pool.

How should I set everything up so that both Boxes play their respective FSMs independently? Please help!

9
PlayMaker Help / Re: How to a store colliders under different names?
« on: July 19, 2019, 02:16:14 AM »
Tnanks Jean, but what is first in first out rule you were mentioning? How do I do it?

Currently I'm just adding objects I'm colliding with to Array using Array Add action which just adds new object to the end of the list. Then I'm looping through the array and triggering events I need on each item in the Array. Is it what you mean?

10
Attaching errors log.

But I was able to kind of solve it by checking if Array list is empty or not by checking an Int variable of Array Length every 1 frame. If Array Length equals 0 -> I'm checking for it again. If Array length is Greater than 0 -> I'm doing Array Get Next looping through the items in Array, each loop around saving the next item in Array in its Result variable.

is it a good way of doing this? I'm just not sure if checking every frame is a good idea for this performance wise.

11
PlayMaker Help / Re: Pooler cant put back to pool Parented objects
« on: July 19, 2019, 12:53:03 AM »
Yes yes I'm doing unparent just before I destroy pooled object but it just won't work. When I'm parenting just one pooled object, it works ok, but when I'm parenting a few of them in a row - some of them won't be unparented..

12
PlayMaker Help / Pooler cant put back to pool Parented objects
« on: July 18, 2019, 06:52:47 PM »
Hi,
 
I'm using great Pooler from Jeanfabre, but I'm experiencing some weird things, so I will probably address my question to him:

I'm Spawning a few Pooled objects from the Pool and parenting them at runtime to my Player, the problem is when I'm trying to do Pooler Destroy Stored, it can't get those pooled child objects back from the Parent to put them back to pool as non parented pooled objects. So one or a few just stay parented forever. Is there a way to fix that or am I missing something? Thanks!

13
in the fsm for the array, check if array list is empty with Array List Is Empty. (the original action does not have a every frame event, you can try the one i have below in the attachment)


Hi, I tried that ArrayListIsEmpty2 action and in Unity 2019.1.7f1 it gave me lots of 'namespaces' errors so I had to delete it. Are there any other ways to check if there are items in my Array list? I was thinking of having an Int variable of number of items in the Array, and comparing every second if it's greater than 0 - then loop through. But I'm just not sure if checking every frame or every second for this is a good idea for mobile platforms. Would you have any info on that please? Thanks!

On collecting a coin place it in a fsm with an array (preferably array list instead of build-in array)

Sorry, looks like I need some clarification here too. Do you mean some special Array List action which is not included (built-in) in the the latest Playmaker version? Thanks a lot Djay!

14
PlayMaker Help / Re: How to a store colliders under different names?
« on: July 18, 2019, 08:52:24 AM »
the key is to delay the spawning using the index in the array as multiplier of the delay value.


so if you find that you have 3 colliders in the array, you spawn the first one instantly, spawn the second one 0.3f later, the third one, 0.6,

so the math is i*0.3 i being the index in the array.

does that make sense?

This sounds very good and exactly what I need but where should I set up this i*0.3 multiplying of indexes and in which action (and in which field) particularly it should happen? Is it in Array Get Next action? How should I make so the first one goes out instantly and others with this 0.3 delay? By delaying do you mean using Wait action?

one way to do this is to have a fsm that checks every 0.3 seconds the array and take out the first item always.

Checking if the Array list is empty every 0.3 sec is a good idea but I have a few questions:

1) Is it ok for performance to do this check that often since I'm aiming for mobile platforms?

2) Wouldn't it be better to send the command to start checking if the Array list is empty only on collision with the first box? And the somehow stop it so it's not checking regularly?

3) How can I check if Array list is empty? I heard from Djaydino that there is action ArrayListIsEmpty2, I even tried importing it from Ecosystem but it gave me lots of errors in Unity 2019.1.7f1 so I had to delete it. Are there any other ways to do that?

Thanks a lot man!

15
PlayMaker Help / Re: How to a tore colliders under different names?
« on: July 17, 2019, 10:11:47 AM »
Thanks for replying Jean! Could you please break it down a bit more for me?

Current Situation: I'm doing infinite runner type of game. I have three Boxes standing right next to each other. Each time Player collides with one of those Boxes - I'm calling an FSM on Box's Parent to Spawn some Random Powerup at Player's position. This Powerup floats above the Player character for some time being parented to a Player and after a second disappears.

Problem: The problem is when I'm colliding with three boxes lying on the ground very close to each other - all three Powerups fly out almost at the same time covering and interpenetrating each other. This happens because I'm calling Spawn Random Powerup immediately each time Player is colliding with the boxes. And what I want is to have Spawned Powerups to appear one after the other even though Boxes were already destroyed - so that Players would clearly see what they got from the box.

Question: How do I set up such an Array, where fast collision with all three boxes will spawn the Powerup of the first Box immediately, but delaying the Powerups of others till the First Powerup is gone completely?

Thanks a lot for reading all of this!

Pages: [1] 2 3 ... 9