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 4 ... 62
Playmaker Help / Re: How to instantiate a Game Object ?
« on: May 26, 2019, 06:56:12 AM »
Sorry, i don't understand what you're aiming at, game object in the scene = instance. If you want to create more instances, you need to put game object in the scene that will have fsm that will create new instances from prefabs.

I recommend some starter unity and playmaker tutorials to learn basics before moving forward.

General Discussion / Re: How To make prefabs
« on: May 25, 2019, 01:51:32 PM »
I guess youu mean how instantiate a game object from prefab. Put create object action in an fsm, drag prefab from the project to the box and voila.

Playmaker Help / Re: How to instantiate a Game Object ?
« on: May 25, 2019, 10:35:01 AM »
Well i though you were having problems because you're using instantiation instead of spawning.

Use create object action for instantiation if you wamt to instantiate them.

Ok, i'll try it out.

Playmaker Help / Re: How to instantiate a Game Object ?
« on: May 25, 2019, 07:05:46 AM »
Use pooling for cubes. The thing with minecraft-like games that use many cubes is that they don't ACTUALLY ise that many, they merely activate and deactivate the visible and invisible ones. You basically have a 3d grid with coordinates, every coordinate is holding data about the cube type, and whether is it visible or not, and spawns cube when it's visible.

Hope that helps, you just need to figure out the way of storing and retrieving the grid data in the most efficient manner.

I can't find that parameter in the scripting api, maybe someonee else will know better.

I can't find indirect intensity in the manual, do you mean ambient light?

Tried this?

Access the properties with get/set and tweak.

No delays.

I haven't tried, but i figured out more elegant solution. I simply added a disabled tag child to the enemy, when it enters the screen, the tag activates, when it exits or the enemy is destroyed, the tag holding object is deactivated (or destroyed) and the spawner is checking the tag count instead of counting the items in the array. When it's zero, it will spawn another wave.

Unfortunately, get tag count uses find objects so it's not quite good performance-wise, but it works.

Nevertheless, i'm really curious why doesn't this work properly since i'll probably need it again sooner or later and i can't seem to find the way to debug it.

It's just there to fill the array so i can get the count. I reckon an int takes the least processing of all data types.

No enemies get in the screen until the array is empty (enemies are either dead or left the screen), so it's quite fail safe in that regard.

There are instances when 10-20 enemies appear at the same time and are to be added to the array, but the problem happens regardless of enemy number.

Strange thing happened, now i'm getting the same warning instead of error.

General Discussion / Re: Frame event on both state
« on: May 23, 2019, 12:07:51 AM »
No, it's not. Make it update as less as possible as long as the result is visibly the same. I usually use wait and set time to 0.1, it's basically the same for the human eye and a lot less taxing on the cpu.

I don't think flow is of much importance here, it's in the start state.

I replaced the arraylist add action with array list add range and it works now, maybe it should be inspected to check for bugs.

For removing from the array list i use array list remove at end remove the item from index 0, as simple as that, no mistake there.

Edit: nah, there's still errors.


That's it, it's completely same everywhere. Here's the array.

Hi guys,

i have an identical FSM in all of my enemy prefabs that adds a number (int) to an arraylist when the enemy enters the screen, and removes an item when the enemy goes out of the screen. It works flawlessly except on one prefab that reports an "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index" error.

I don't get it, it's a completely same action (array list add) with completely same parameters on all objects.

Any ideas?

Are you using UiNavigationSetMode action? If not, delete it.

Pages: 1 [2] 3 4 ... 62