Random Chitchat 2012-2016
i think its done Wink testing it nowBig Grin

ok i got it exported but i have to give it cItems. how can i create that?
Thanks given by:
I expect something like this to work:
local Pickups = cItems();
Pickups:Add(...);
Pickups:Add(...);
Thanks given by:
i get an error at local Pickups = cItems();
Attempt to call a non-callable object.
Thanks given by:
Try putting this code into cItems declaration (in source/Item.h, line ~100):
	// tolua_begin
	
	/// Need a Lua-accessible constructor
	cItems(void) {}
	
	cItem & Get   (int a_Idx) {return at(a_Idx); }
Run AllToLua and try again.
Thanks given by:
Thanks it works now. do you want the world.h etc?
Thanks given by:
(05-09-2013, 10:20 PM)STR_Warrior Wrote: Thanks it works now. do you want the world.h etc?
Will it fix something?

I found a bug. Mobs don't move, and you can't hurt them. Also, if you stop the server with AnimalsOn=1, it crashes.
Thanks given by:
(05-09-2013, 11:23 PM)tonibm19 Wrote: Will it fix something?

you can spawn pickups using plugins Smile I wanted it becouse i'd like to see if i can create a plugin that fixes #338 and it does Smile
Thanks given by:
Quote:you can spawn pickups using plugins Smile I wanted it becouse i'd like to see if i can create a plugin that fixes #338 and it does Smile
If you do it please send me the first working version.
Thanks given by:
Commit those code changes to svn, I'm in the middle of other work so my code is "dirty" right now.

Oh and by the way, congratulations, you just managed to export a new function to the Lua API. You now know enough to make all the necessary changes, should you ever need to add another function Smile

How exactly does your plugin fix #338? By spawning the pickups with zero velocity?
Thanks given by:
yea thanksBig Grin I was thinking about exporting the DoExplosionAt function but the explosions are not finished yet so i think i'l wait Wink

It seems like i can only commit changes to the Plugins folder ;(
EDIT:
No wait Wink i commited it.

(05-09-2013, 11:54 PM)xoft Wrote: How exactly does your plugin fix #338? By spawning the pickups with zero velocity?

I think so. at least i don't see any pickups above ground and i can pickup all the other pickups under ground. i think the problem is that the pickup gets spawned into another block and then the pickup gets moved above.
Thanks given by:




Users browsing this thread: 58 Guest(s)