Hey, we have forums!

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

Pages: [1]
1
Modding / Re: Adding an entity, can't see it
« on: September 04, 2009, 05:44:54 am »
For context, I'm trying to "replace the main character" as another thread described. I have another entity that, when initialized, hides Naija and updates itself by mimicking her movements.

I added a Mithalan. The Mithalan doesn't really unfold visibly. Both he and Naija appear as the mod loads, and then after about a second Naija disappears and the new image appears and instantly rotates. The delay is probably the cause of my rotation problem. Any ideas? My init function for the replacement entity is pretty thin, as you can see above, so I can't imagine it simply taking too long to complete.

2
Modding / Re: Adding an entity, can't see it
« on: September 03, 2009, 04:20:34 pm »
Alec said it's "~" if things are working correctly. "~" doesn't work.

Whenever the entity gets initialized, it rotates one revolution very quickly before beginning its idle animation. I cleared everything but a single key in the animation (so that the idle animation is complete inactivity) and it still does this. Anybody know why this would be?

3
Modding / Re: Adding an entity, can't see it
« on: September 01, 2009, 06:04:34 pm »
Which XML file do I need to edit to get that debug console or debug keys? Is it usersettings.xml? What element do I need to add?

4
Modding / Re: Adding an entity, can't see it
« on: September 01, 2009, 07:40:35 am »


That comma was the only problem. Geez...

I guess I've never had to track down my own syntax errors before, I always get a compile error or some other error report.

Thanks very much.

5
Modding / Adding an entity, can't see it
« on: August 31, 2009, 06:21:57 am »
Please help a n00b.

I'm trying to add an entity per the Modding Guide. It's an entity called "Bob" with a simple "bobbing" idle animation. The animation uses a single bone called "head" that is associated with a picture of Naija's head, which I pulled from a working mod.

When I go to add the entity in the editor, I can see a preview in the entity menu that looks like Naija's head; so far so good. But when I paste it, all I get is a minuscule little white dot that doesn't looks like Naija no matter how far I zoom in. Does anybody know why this would happen? I'd appreciate any insight you can give me; I've been experimenting and searching the forums for two days.

Here's my code. My graphics directory contains a directory called "bob" and within that there is a file called "head.png".

bob.lua:
Code: [Select]
dofile("scripts/entities/entityinclude.lua")

function init(me)
setupBasicEntity(
me,
"", -- texture
4, -- health
2, -- manaballamount
2, -- exp
1, -- money
48, -- collideRadius
STATE_IDLE, --initState
90, -- sprite width
90, -- sprite height
1, -- particle "explosion" type (see particleEffects.txt)
1, -- 0/1 hit other entities off/on
4000, -- updateCull -1: disabled, default: 4000
)

entity_setEntityType(me, ET_ENEMY)
entity_initSkeletal(me, "bob")
entity_setState(me, STATE_IDLE)

--entity_animate(me, "idle", LOOP_INF)

end

-- after nodes have inited
function postInit(me)
end

function update(me, dt)
entity_updateMovement(me, dt)
end

function enterState(me)
--if entity_isState(me, STATE_IDLE) then
-- entity_animate(me, "idle", -1)
--end
end

function exitState(me)
end

function damage(me, attacker, bone, damageType, dmg)
--return false
end

function animationKey(me, key)
end

function hitSurface(me)
end

function songNote(me, note)
end

function songNoteDone(me, note)
end

function song(me, song)
end

function activate(me)
end

bob.xml:
Code: [Select]
<AnimationLayers>
    <AnimationLayer />
</AnimationLayers>
<Bones>
    <Bone idx="0" gfx="bob/head" pidx="-1" name="head" fh="0" fv="0" gc="0" cr="0" cp="0 0" />
</Bones>
<Animations>
    <Animation name="idle">
        <Key e="0 0 1 -13 -360 0 0 0 0 0 0 0 0 0 0 0 " />
        <Key e="0.6 0 0 -35 -358 0 0 0 0 0 0 0 0 0 0 0 " />
        <Key e="1.2 0 1 -13 -360 0 0 0 0 0 0 0 0 0 0 0 " />
    </Animation>
</Animations>

entitygroups.txt:
Code: [Select]
GROUP:Creatures
crotoid
moneye
nautilus
bob bob/head

GROUP:Plants
healthPlant


Pages: [1]