Problem with Persist behavior attached to 3D shape with sprites in container?

0 favourites
  • 8 posts
From the Asset Store
3D Car Pack 1
$2.99 USD
3D models + Rendered Low-Poly Cars in isometric, top-down, and side angles.
  • hello guys, im making 3D game, i added lot 3D objects and lot sprites attached (as container) to one object for making 'skins' for NPC characters.

    Because this 3D shape object is template to make other NPC's with other skins and stats.

    Everything works very well until i added Persist behavior to this 3d shape object '3dNPC'

    After adding Persist object to '3DNPC' when im go to layout 2 and when im back to start level layout 1 , the game becomes unplayable. Controls dont working, shooting dont working, NPC behave weird also weird looped sounds !

    I dont do anything after preview, This happens when I leave the level intact, just exit and re-enter.

    3DNPC have instance variables:

    -numbers

    -strings

    in Container 15 sprites as Faces

    Any ideas?

    Tagged:

  • It's going to be impossible to guess, we'll need to see the project. If the persist behaviour is added to a random NPC that just exists in the level I'm not sure how it would affect the player object.

  • It's going to be impossible to guess, we'll need to see the project. If the persist behaviour is added to a random NPC that just exists in the level I'm not sure how it would affect the player object.

    i think i found one problem whan can cause errors, its instance variables?

    check out video below

  • Video on my Youtube with problem when i add Persist:

    youtu.be/OcjQfkLCOgo

    After add Persist to 3D shape i receive problem:

    -sky is dissappear

    -i cant move

    -looped sound

    -npc behave weird

    -attack animations dont works

    -even if i touch orange field to go to World map, this condition and event dont work (i cant check others because i cant move)

    the problem is even with those elements that are not related to this object, e.g. the sky or the attack animation, so if i add persist to one 3d shape obiect called "3DNPC" this cause many problems in many elements of game.

    So now i must work without persist behavior

  • Like I said kind of impossible to guess we would need the project. Of course after you punch the NPC that will keep the variables set, which I guess is what you are trying to do anyway. Is the player also the same object as the NPC? If this is the case then player will has some variables persisting that maybe should not be, or you talk about containers, what objects are in a container?

  • Hello delgado !

    I have the same problem but my persist objects are only 2D. Think it's not the fact that your object is 3D but the container system that make the runtime crashing.

    Can you test your project in older release ? I don't have this issue in Beta R318 for example. Only with R327. I've read the bug fix notes of the Beta R326 and it says :

    "Hierarchies: runtime crash loading the state of instances in a hierarchy which are also using the persist behaviour"

    I think there is a same issue but with the container.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Interesting, i have saved old versions of my project (every day one save backup) i test and let you know, i must find what cause problem because without this Persist will be dificulkt to make fine game

  • Like I said kind of impossible to guess we would need the project. Of course after you punch the NPC that will keep the variables set, which I guess is what you are trying to do anyway. Is the player also the same object as the NPC? If this is the case then player will has some variables persisting that maybe should not be, or you talk about containers, what objects are in a container?

    All containers is sprites:

    Player obiect its another obiect (not the same as 3DNpc)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)