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

Pages: 1 [2]
"Create Object" "Trigger Event" "Destroy Object"

PlayMaker Help / [SOLVED] Hide Parent+Children?
« on: June 23, 2012, 02:32:16 PM »
I would like to hide a parent and all its children at once, is there a way to do this without turning off the script of the parent and the collisions of the childs?

I dont want to hide each children on its own with a loop because there a lot of children and after the hide it needs to unhide very quick again.

Change wouldnt help me anymore now that i know it. :P Took me some time to figure it out, the errors where also only more confuseing for me. A comment or checkbox should be nice so new users can figure it out right away.

Just got my new problem solved with the ArrayMaker, thx! But i found it strange that the "array list count" gives me a count that is 1 too high. So before the "array list get" i had to make the index -1.

I got that problem more or les solved now but hit already the next wall. I have that with the raycast loop now with a send event that has a 0.01 delay, that is kinda instant, strangely its faster then a "wait".

My current Problem: Im using "get next child" to rename the objects of a match chain that is long enough. After all objects have been checked for chains, all those renamed objects get then again cycled through with "get next child" and "check name". But when i try to "delete" or "set parent" the current "get next child" it messes up the "get next child" function which results that not all objects get destroyed. There is always 1 or 2 that i cant receive anymore with "get next child". When i replace the "destroy" with a "scale" it cycles through all just fine.
But i just had the idea i could transform every object that should be destroyed to a certain position and then cycle through all these objects again with a raycast loop and destroy them with that. Will be kinda strange but should work.

@ kiriri
That infinite loop setting is already set to 100, dont know why it then stops my build with a warning where i have les then 100 objects. A lag shouldnt be a problem in my case since its turnbased and the loop only happens after a turn.

@ jeanfabre
More abstract would be nice but i need to check chains horizontal and vertical, "get next child" can then not replace the raycast check for neighbours (a object can also be in a vertical chain and at the same time in a horizontal) . Im already using tags for the colors check. Array Maker sounds great, i guess it would be then something similiar like objectslists in UDK kismet. I guess i could just use a array list to delete the objects.

Im trying to make a match puzzle, something similiar to Bejeweled. After every turn i want to check through all tiles in the grid for chains. So i check the first tile and with a raycast check if the neighbour tile is the same colour, the loop repeats that for all the tiles, if a ray doesnt hit it goes to the next row (currently only check horizontal). when all checked it should delete the tiles of which the chain is long enough and then i would need another loop that check which tiles will have to move down to fill the empty space.

Is it normal that loops can only for loop a specific amount of cycles or time in playmaker? Im new to playmaker but have lots of experience with visual scripting through UDK Kismet.

That trick let it run through some more objects before it gives the infinite loop error. But unfortunately not enough, i have 49 objects and it goes through 39 now.
I know for sure that its not a loop because with the "wait" it goes into the end state i made. I might also need to mention that both "hit" and "not hit" keep the loop going, til all objects have a ray casted.

I made a "raycast" with a "bool test" of the "Store Did Hit" bool, so i can have actions for both cases (hit and not hit). The raycast gets repeated for all my sphere "game objects" in the level without a "wait" inbetween. But that results in a "infinite loop" error and my script stops. Even though its clearly not a loop because when i use a "wait" it cycles through all my gameobjects just fine, having a wait in it is too slow though.

Im also wondering why there is only a "hit event" in the raycast parameters and no "not hit event"? Without the bool test i use it would then simply have to stop when the ray doesnt hit.

Pages: 1 [2]