Jump to content

Making a character creature


Recommended Posts

Hello there! I apologize for making all these posts, I do have a lot of trouble and even more questions ^^'...

 

I want to make a creature use the same animation a character uses. I took the Extended Sample Character, changed "template" to "clone_thibaud" and "BUILD_PLAYER" to "BUILD_CLONE_THIBAUD". I was told that using stategraph "SGwilson" the creature would have the right animations. Is this okay? Am I missing anything?

 

The ultimate goal is to make this creature a craftable mob that attacks to defend the player. A bit in the spirit of maxwell's puppets, but without any chopping or mining.

 

Currently, every time I try to spawn the creature in, the game crashes. Here's what the log says : (the crash is at the very end so I skipped some, it's really just the last lign I think)

[00:00:33]: Validating ID -1: world: <nil> (auto) available: false receives: -1 status: inactive (disabled by prefab) [00:00:33]: Can't find prefab spawnpoint [00:00:33]: SpawnSaveRecord [nil, spawnpoint] FAILED [00:00:34]: Reconstructing topology [00:00:34]:  ...Sorting points [00:00:34]:  ...Sorting edges [00:00:34]:  ...Connecting nodes [00:00:34]:  ...Validating connections [00:00:34]:  ...Housekeeping [00:00:34]:  ...Done! [00:00:34]: Truncating to snapshot #2...[00:00:34]:  - session/46AB1BD0D0CDCD7C/KU_Z-I45r8r_/0000000003[00:00:34]:    1 file(s) removed[00:00:34]: 1 uploads added to server. From server_temp[00:00:34]: Telling Client our new session identifier: 46AB1BD0D0CDCD7C[00:00:34]: ModIndex: Load sequence finished successfully. [00:00:34]: Reset() returning[00:00:35]: [SHARD] Registering portal ID #1 [00:00:35]: Validating ID 1: world: <nil> (auto) available: false receives: 1 status: inactive (disabled by prefab) [00:00:35]: Attempting to send resume request[00:00:35]: Received request to resume from: session/46AB1BD0D0CDCD7C/KU_Z-I45r8r_[00:00:35]: ReceiveResumeNotification[00:00:35]: Deleting user minimap from session/46AB1BD0D0CDCD7C/KU_Z-I45r8r_/minimap[00:00:35]: Deleting user session from session/46AB1BD0D0CDCD7C/KU_Z-I45r8r_/0000000003[00:00:35]: [SHARD] Registering portal ID #2 [00:00:35]: Validating ID 2: world: <nil> (auto) available: false receives: 2 status: inactive (disabled by prefab) [00:00:35]: [SHARD] Registering portal ID #3 [00:00:35]: Validating ID 3: world: <nil> (auto) available: false receives: 3 status: inactive (disabled by prefab) [00:00:35]: [SHARD] Registering portal ID #4 [00:00:35]: Validating ID 4: world: <nil> (auto) available: false receives: 4 status: inactive (disabled by prefab) [00:00:35]: [SHARD] Registering portal ID #5 [00:00:35]: Validating ID 5: world: <nil> (auto) available: false receives: 5 status: inactive (disabled by prefab) [00:00:35]: [SHARD] Registering portal ID #6 [00:00:35]: Validating ID 6: world: <nil> (auto) available: false receives: 6 status: inactive (disabled by prefab) [00:00:35]: [SHARD] Registering portal ID #7 [00:00:35]: Validating ID 7: world: <nil> (auto) available: false receives: 7 status: inactive (disabled by prefab) [00:00:35]: [SHARD] Registering portal ID #8 [00:00:35]: Validating ID 8: world: <nil> (auto) available: false receives: 8 status: inactive (disabled by prefab) [00:00:35]: [SHARD] Registering portal ID #9 [00:00:35]: Validating ID 9: world: <nil> (auto) available: false receives: 9 status: inactive (disabled by prefab) [00:00:35]: [SHARD] Registering portal ID #10 [00:00:35]: Validating ID 10: world: <nil> (auto) available: false receives: 10 status: inactive (disabled by prefab) [00:00:37]: WARNING! Could not find region 'FROMNUM' from atlas 'FROMNUM'. Is the region specified in the atlas?[00:00:37]: Looking for default texture 'FROMNUM' from atlas 'FROMNUM'.[00:00:39]: Received request to spawn as () thibaud from Thibooms[Host][00:00:39]: Received clothing request () () () ()[00:00:39]: Validated skin: thibaud () () () () ()[00:00:39]: Could not find anim build FROMNUM[00:00:39]: Could not find anim bank [FROMNUM][00:00:39]: [Fixed] SPAWNING PLAYER AT: (-240.00, 0.00, -180.00) [00:00:39]: Serializing user: session/46AB1BD0D0CDCD7C/KU_Z-I45r8r_/0000000003[00:00:39]: WARNING! Could not find region 'FROMNUM' from atlas 'FROMNUM'. Is the region specified in the atlas?[00:00:39]: Looking for default texture 'FROMNUM' from atlas 'FROMNUM'.[00:00:39]: Loading minimap from session/46AB1BD0D0CDCD7C/KU_Z-I45r8r_/minimap[00:00:39]: Clearing minimap[00:00:46]: Assert failure 'mTrans' at ..\source\game\components\PhysicsComponent.cpp(143): Trace follows...

 

I don't know what's wrong. But here's the prefab lua :

--Here we list any assets required by our prefab.local assets={--this is the name of the Spriter file.Asset("ANIM", "anim/clone_thibaud.zip"),}--This function creates a new entity based on a prefab.local function init_prefab()--First we create an entity.local inst = CreateEntity()MakeCharacterPhysics(inst, 75, .5)    inst.Physics:SetCollisionGroup(COLLISION.CHARACTERS)    inst.Physics:ClearCollisionMask()    inst.Physics:CollidesWith(COLLISION.WORLD)    inst.Physics:CollidesWith(COLLISION.OBSTACLES)    inst.Physics:CollidesWith(COLLISION.CHARACTERS)inst.Transform:SetFourFaced()--The bank name is the name of the Spriter file.    anim:SetBank("clone_thibaud")    --The build name is the name of the animation folder in spriter.    anim:SetBuild("clone_thibaud")inst.entity:AddSoundEmitter()    inst.entity:AddDynamicShadow()inst.DynamicShadow:SetSize(2.5, .75)    inst.entity:AddMiniMapEntity()    inst.entity:AddNetwork()    inst.entity:AddLightWatcher()inst:SetStateGraph("SGwilson")inst:AddComponent("health")    inst.components.health:SetMaxHealth(TUNING.CHESTER_HEALTH)--[NEW] We need to add a 'locomotor' component otherwise our creature can't walk around the world.inst:AddComponent("locomotor")    inst.components.locomotor.walkspeed = 6    inst.components.locomotor.runspeed = 6    --return our new entity so that it can be added to the world.    return instend--Here we register our new prefab so that it can be used in game.return Prefab( "monsters/clone_thibaud", init_prefab, assets, nil)

 

Thank you for reading, any help is appreciated of course :-)

Edit: If anyone has the time, please consider helping me further with this bug : a creature appearing invisible. I feel like all of these should be easy to do, but I don't know why I always find myself stuck at some point. :/

Edited by Thibooms
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...