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
Hi all,

i'm trying to find a solution for rotating some missiles towards direction.

After they're being fired they are moved using translate with no set target. I'm not using velocity so i can't get the direction with velocity data (it's 0,0 since i'm translating the missiles), and i don't know how can i get the direction every frame to apply the rotation by using some other method.

All ideas except "move them using velocity" are welcome  ;D

Edit: of course, the child will be rotating so it doesn't affect the movement.

I sorted it out by changing the system altogether (by using tag count), since i'm knee deep and i can't afford to switch to array again to try putting in the next frame for test sake. I'll be probably using more array lists in the future so i'll keep this in my sights.

PlayMaker Help / Re: How to instantiate a Game Object ?
« on: May 27, 2019, 05:10:43 AM »
Really depends on the size of the world, number of cubes and visibility distance. I presume he uses raycasts ot detect where the cube will be placed and the instantiates them, which is a no-no, only spawning. Chuck solution seems the best, chunk activates on distance from player, doesn't need to be anything more dynamic than that.

General Discussion / Re: How to rename global variables?
« on: May 26, 2019, 11:55:33 PM »
Are you sure it works without any fuckups? Can Jean and Alex confirm this is a valid way to change globals and not break references?

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.

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.

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