Data Realms Fan Forums http://45.55.195.193/ |
|
Doesn't seem to be attaching my script http://45.55.195.193/viewtopic.php?f=1&t=19112 |
Page 1 of 1 |
Author: | Awesomeness [ Sun Jun 27, 2010 3:20 am ] |
Post subject: | Doesn't seem to be attaching my script |
This is the ini: Code: AddEffect = ACrab PresetName = Parasite // AddToGroup = Wildlife AddToGroup = Parasites Mass = 15 Buyable = 1 GoldValue = -1000000 HitsMOs = 1 GetsHitByMOs = 1 SpriteFile = ContentFile FilePath = Base.rte/Actors/Wildlife/CrabBodyA.bmp FrameCount = 2 SpriteAnimMode = 4 SpriteAnimDuration = 250 ScriptPath = Parasite.rte/Lua/Parasite.lua //IT'S NOT DOING ME! SpriteOffset = Vector X = -9 Y = -8 EntryWound = AEmitter CopyOf = Wound Bone Entry ExitWound = AEmitter CopyOf = Wound Bone Exit AtomGroup = AtomGroup AutoGenerate = 1 Material = Material CopyOf = Shelled Flesh Resolution = 4 Depth = 0 DeepCheck = 0 //and so on There's probably some stupidly obvious reason why my script isn't being called, but could you please tell me where it is? |
Author: | CaveCricket48 [ Sun Jun 27, 2010 3:22 am ] |
Post subject: | Re: Doesn't seem to be attaching my script |
Is the filepath correct? Also, post your script too, incase it's a Lua problem. |
Author: | Awesomeness [ Sun Jun 27, 2010 3:26 am ] |
Post subject: | Re: Doesn't seem to be attaching my script |
Code: function Create(self) self.killdist = 50; end function Update(self) for actor in MovableMan.Actors do local curdist; curdist = math.sqrt(math.pow(self.Pos.X - actor.Pos.X,2) + math.pow(self.Pos.Y - actor.Pos.Y,2)); if curdist <= self.killdist and actor:IsInGroup("Parasites") == false then actor.Health = actor.Health - 2; end end end The script doesn't do exactly what it's supposed to do yet. I checked if it worked already by putting "self.Health = 0" in create(), and looked to see if the drop ship spat out a crab corpse. It gave me a live one. EDIT: And yes, the filepath is correct. |
Author: | CaveCricket48 [ Sun Jun 27, 2010 3:27 am ] |
Post subject: | Re: Doesn't seem to be attaching my script |
Check the console for errors. |
Author: | Awesomeness [ Sun Jun 27, 2010 3:30 am ] |
Post subject: | Re: Doesn't seem to be attaching my script |
Yeah... About that... I can't open it. Pressing the key with the tilde on it does nothing... Is it different in the Mac version or something? It's been driving me crazy. |
Author: | Duh102 [ Sun Jun 27, 2010 3:31 am ] |
Post subject: | Re: Doesn't seem to be attaching my script |
I think it's ctrl + one of the slashes. Not entirely sure. |
Author: | Awesomeness [ Sun Jun 27, 2010 3:36 am ] |
Post subject: | Re: Doesn't seem to be attaching my script |
Duh102 wrote: I think it's ctrl + one of the slashes. Not entirely sure. Thanks, you're right! It's control+forward slash. EDIT: Nevermind, I didn't even change anything, and it's working all of a sudden... Weird. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |