No working lua anim scripts

No working lua anim scripts

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
code_man
Posts: 260
Joined: 19 Jan 2014, 13:10

No working lua anim scripts

Post by code_man »

I want to convert some of the old cob/bos scripts of simbase to lua due to bugs in them.
But after a while i noticed it doesnt work at all, some dude on #moddev mentioned i need a special gadget for the engine to recognize lua scripts.

Now the strange thing is, in a game a made almost from scratch, the only lua i have is the flowing one:

Code: Select all

VFS.Include("LuaGadgets/gadgets.lua",nil, VFS.BASE)
inside "/LuaRules/main.lua" and lua scripts work there.
But in simbase they just dont work, despite this file being there too and i have removed also all possible other lua files that might have caused a conflict but to no effect.

I already asked this on #moddev but i got a in a bit of stress and forgot.
But seriously whats the deal here, shouldnt this be just part of the engine?
Just whats going on?
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: No working lua anim scripts

Post by gajop »

What's simbase? link code.
"Lua scripts" is too broad, you have LuaUI (widgets), LuaRules (gadgets), and so on.
User avatar
code_man
Posts: 260
Joined: 19 Jan 2014, 13:10

Re: No working lua anim scripts

Post by code_man »

gajop wrote:What's simbase? link code.
See http://springrts.com/phpbb/viewtopic.php?f=79&t=32118 to know whats going on, tough il have to upload all of the /LuaRules/ stuff since i changed things and im not sure if things available in that thread are the same ones as i have right now.
I dont think il manage to squeeze this in today, il see if i can tomorrow.
"Lua scripts" is too broad, you have LuaUI (widgets), LuaRules (gadgets), and so on.
Well i mean stuff in /LuaRules, but since there is LuaRules/gadgets i wasnt sure if i should have called it gadgets, but i mean all Stuff under LuaRules.

I did forgot to mention that there is no infolog error of any kind with this, it just doenst even start.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: No working lua anim scripts

Post by FLOZi »

code_man wrote: Now the strange thing is, in a game a made almost from scratch, the only lua i have is the flowing one:

Code: Select all

VFS.Include("LuaGadgets/gadgets.lua",nil, VFS.BASE)
inside "/LuaRules/main.lua" and lua scripts work there.
You are incorrect.

LUS will not function without the unit_script gadget. <-- full stop

https://github.com/FLOZi/SpringABC/blob ... script.lua
User avatar
code_man
Posts: 260
Joined: 19 Jan 2014, 13:10

Re: No working lua anim scripts

Post by code_man »

You were right, it really was in my other game.
So i got things working now.

Tough still, why is this even needed?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: No working lua anim scripts

Post by FLOZi »

Because Lua Unit Scripts are an extension of the gadget API.

It could go in LuaRules/ in base content so it was always available, but that runs counter to all other gadget code.

(Should still be done imo but what do I know)
Post Reply

Return to “Game Development”