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

Pages: [1] 2 3 ... 29
1
Ah yes, beer helped, now some sleep  ;D

2
I solved it, and you won't believe the stupidity of the situation. Those two prefabs i spawn are the same, but one is rotated along y axis (it's upside down). I could swear that i had the group instance with two same named objects, only one of them set to -1 Y scale. The group i was testing had PrefabName and ReversePrefabName, i probably took some old prefab version. The thing is, once the object enters the frustum, it pulls HP data from hash table, and then goes to wait for collision/wait for frustum exit state. Since the prefab name is wrong, it draws 0 HP from the hash table and is immediately destroyed. But what about the other? Well, when the first one is destroyed, the screen shakes just enough on the horizontal scale to put the remaining one out of frustum again and destroy it.

What a show.

3
Hello,

I'm using this action a lot in my project since it's a lot better than default VISIBLE/NOT VISIBLE actions which take the scene view into consideration too, so i can enter the play mode without maximizing the window and see what's happening outside the frustum.

I've got some objects that spawn outside frustum, start moving and upon entering the frustum activate their children, submodules etc. There are many reasons for that, from getting exact count of enemies on screen, over avoiding firing from outside the screen and finally for deactivating the object when it leaves the screen.

It served me well until today. I'm using a templated FSM for configuring the whole object which contains the aforementioned action that activates a set of states upon entering frustum, and deactivates them when the object exits. But, as i applied it to two new object today, they are detected as visible in frustum when they enter it and then, when they pass the few states (matter of few frames perhaps), they are immediately detected as not visible and deactivated. They basically don't even enter the frustum, it's like they hit the frustum edge and disappear.

The only difference between objects used before and these ones is speed. The ones set to 0.8f and 0.4f work as intended, but these are 0.2f.

Is it somehow possible that they are too slow and they somehow jitter around and enter and exit the frustum? I use translate with fixed update, so that shouldn't be a problem, but nothing else comes to my mind.


4
Playmaker Help / Re: Check if a game object has an FSM named "Banana"
« on: November 24, 2017, 08:31:57 AM »
I figured it out in the end, thanks for directions and help  ;D

5
Playmaker Help / Re: Check if a game object has an FSM named "Banana"
« on: November 15, 2017, 09:31:28 AM »
Hmmm, i just checked it out on ecosystem. Ok, i can get an fsm name, but  how will that help me? I'm afk btw so i'm a bit senseless :D

6
Playmaker Help / Check if a game object has an FSM named "Banana" [SOLVED]
« on: November 15, 2017, 07:10:24 AM »
Hi guys,

i have an FSM which is present in some object and in some not (let's call that FSM "Banana"), but every object has an FSM which needs to check if the object has FSM named "Banana" or not on itself so it can continue doing it's stuff.

Any idea on how to do this? I suppose Has Component should do, but i probably got some more stuff to write in the component field since there are few FSM's on that object.

7
Playmaker Help / Re: Ideas for system improvement
« on: November 15, 2017, 06:34:44 AM »
Great idea, i'll try it out! Thanks!

8
ah i figured it out  ;D

9
Hi guys,

need a little help on this one. I need to call a static method from Pool Boss, and i haven't done a lot of things with. Here's the action.



Here's the API



I'm not quite sure what should i enter in method parameters. I tried prefabName, but as a result i get exactly that, "prefabName"  ::)

Here's the method

Code: [Select]
      public static string GetPrefabName(string prefabName) {
            var iParen = prefabName.IndexOf(" (Clone", StringComparison.Ordinal);
            if (iParen > -1) {
                prefabName = prefabName.Substring(0, iParen);
            }

            return prefabName;
        }



10
Playmaker Help / Re: Ideas for system improvement
« on: November 11, 2017, 12:48:39 PM »
I'm using Pool Boss for pooling and just read the API, there's a getprefabname method that will solve all the string stuff, but i think it can still be much more elegant and not string dependant :)

11
Playmaker Help / Re: Ideas for system improvement
« on: November 11, 2017, 12:37:20 PM »
You mean when i pick it up, the weapon equipped on ship gets fsm variables from the pickup like name, other components and so on? I don't think it's a bad idea, i just don't have an idea how to handle the upgrade mechanics other then comparing the name of the pickup.

Would i get into a problem if i rename the clones to their original names on spawn? Can two same named object exist in the same scene at all anyway?

Edit: i just read that they can, i just need to check if there will be trouble on despawning.

12
Work In Progress... / Re: Erebus : Shmup
« on: November 11, 2017, 04:53:40 AM »
Keyboard :)

13
Work In Progress... / Re: Erebus : Shmup
« on: November 11, 2017, 12:01:59 AM »
Ok, i played until the end of level, here's my notes :)

1. Ship movement is frustratingly slow. It takes a while for it to speed up, it kinda feels heavy. Compared to the enemy bullets, it's hard to avoid them even if you're skillful.

2. Needs "Restart Button", i don't want to go to main menu to start again.

3. Fonts in main menu are blurry, use textmesh pro

4. Enemy bullets are too small and don't have enough contrast compared to background

5. Pickups should be more distinct, i don't know what i'm picking up, and when i pick it up, if it's not a weapon i have to look at hud to see if it's speed or life.

That's it for now, more enemies and wave patterns are a must of course :)

My kid's still sleeping so i played without sound.

14
Playmaker Help / Ideas for system improvement
« on: November 10, 2017, 10:57:52 PM »
Hi guys,

I remade the weapon, firing, bullet and pickup system into something more universal, so i can just copy/paste FSM's to necessary objects and use local variables to do the necessary stuff, but there's an oversight i made and i need a fix. Here's a quick explanation.

I have weapons which names are structured like this:

PulseGunWeaponLevel1
PulseGunWeaponLevel2
PulseGunWeaponLevel3
PulseGunWeaponLevel4
PulseGunWeaponLevel5

Since i'm using pooling system, (clone 1), (clone 2) etc. string is appended when the weapon is spawned, so the name are actually like this:

PulseGunWeaponLevel1 (clone 1)
PulseGunWeaponLevel2 (clone 1)
PulseGunWeaponLevel3 (clone 1)
PulseGunWeaponLevel4 (clone 1)
PulseGunWeaponLevel5 (clone 1)

Since there will be no more than a few instances in the scene (certainly not more than nine) it made sense to make the folowing hash tables:

PlayerWeapon
PlayerWeapon Key / PlayerWeapon Value
PulseGunLevel1 (string)/PulseGunLevel 1 (object)

To get the true object name out of a spawned object which contains (clone x) appendix, i get the object name, get name length, convert it into string, use the int operator to subtract the last 10 characters (" (clone_1)"), and the get string left to get the name without the (clone 1) appendix. Then i can use that name to get whatever data i need on that weapon on runtime (display name, weapon type display name for the hud and so on).

While not so complicated and applicable to weapons, it is not applicable to bullets since they appear in more than nine instances (clone 10, for example) on the screen and the whole "subtract last 10 characters" idea falls flat. Sure, i could compare the string length and then subtract last 10 or 11 characters depending on the length, but it it unnecessary complicated.

Djaydino had some ideas http://hutonggames.com/playmakerforum/index.php?topic=16064.msg74988#msg74988, and he was pointing to the problem in time, but i'm not sure how to do it, so any suggestions or step-by-steps are welcome.

Maybe using enums? I haven't used them before though. Can i define an enum so that every pooled clone always has the same name actually so i don't have to mess around with string concatenation, building and truncating?

15
I'm quite a noob for using xml in game design, but i reckon it would be cool if it could use some sort of nested structure like class inheritance. Something like this:

<EnemyType>
   <EnemyType1>
      <Weapon>Blaster</Weapon>
      <Armor>Adamantium</Armor>
      <Sprite>image.png</Sprite>
      <EngineAnimation>Animation.anim</EngineAnimation>
      <LocalWeaponPosition>(x,y,z)</LocalWeaponPosition>
   </EnemyType1>
</EnemyType>

I suppose you could get data on either runtime or populate some sort of data structure like array or hashtable and then draw data on runtime.

Pages: [1] 2 3 ... 29