View unanswered posts | View active topics It is currently Mon Jul 08, 2024 3:37 pm



Reply to topic  [ 2 posts ] 
 Need help for Cordyc (pie menu upgrade system) 
Author Message
User avatar

Joined: Mon Apr 13, 2009 12:27 pm
Posts: 813
Location: Yogyakarta, Indonesia. A slice o' paradise.
Reply with quote
Post Need help for Cordyc (pie menu upgrade system)
So yeah, I need someone to take a look at my Lua files in Cordyc, and make the 'upgrade' process pie menu-able.
viewtopic.php?f=61&t=19123

I have tried it myself, but it won't work, as in it loads good, but it does nothing.
There's already pie menu graphics in Cordyc.rte/Sprites/piemenu, and there's remnants of my failed try at piemenu in Cordyc.rte/SparkleMagic/Piemenus.lua.

If you can reliably do it, I'll put your name in the credits. Thanks! :D


Sun Nov 06, 2011 4:44 pm
Profile YIM WWW
DRL Developer
DRL Developer

Joined: Tue Aug 11, 2009 5:09 am
Posts: 395
Reply with quote
Post Re: Need help for Cordyc (pie menu upgrade system)
A self variable declared in the update function is not accessible from the pie-menu script.


Another, unrelated problem is that you have copied the entire contents if the HumanAI file to you actors. This will overwrite the global table called HumanAI, redefine all behaviors and all AHumans in the game will potentially use your behaviors instead. I realize that this was bound to happen because of how I coded it and will try to fix it in future versions.

You only need to copy the Create and UpdateAI functions, and if you want to create a behavior unique to your actor just store it in a table of your own like this:
Code:
MyAiStuff = {}
function MyAiStuff.GoToWpt(self)
   ...
end

and then you find the function CreateGoToBehavior in Create() and replace self.NextGoTo = coroutine.create(HumanAI.GoToWpt) with self.NextGoTo = coroutine.create(MyAiStuff.GoToWpt).


Mon Nov 07, 2011 5:53 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.043s | 13 Queries | GZIP : Off ]