View unanswered posts | View active topics It is currently Sun Jan 05, 2025 5:06 am



Reply to topic  [ 7 posts ] 
 Doesn't seem to be attaching my script 
Author Message
User avatar

Joined: Sat Jun 19, 2010 5:02 pm
Posts: 331
Location: Mekkan
Reply with quote
Post 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?


Sun Jun 27, 2010 3:20 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Doesn't seem to be attaching my script
Is the filepath correct? Also, post your script too, incase it's a Lua problem.


Sun Jun 27, 2010 3:22 am
Profile
User avatar

Joined: Sat Jun 19, 2010 5:02 pm
Posts: 331
Location: Mekkan
Reply with quote
Post 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.


Sun Jun 27, 2010 3:26 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Doesn't seem to be attaching my script
Check the console for errors.


Sun Jun 27, 2010 3:27 am
Profile
User avatar

Joined: Sat Jun 19, 2010 5:02 pm
Posts: 331
Location: Mekkan
Reply with quote
Post 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.


Sun Jun 27, 2010 3:30 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Doesn't seem to be attaching my script
I think it's ctrl + one of the slashes. Not entirely sure.


Sun Jun 27, 2010 3:31 am
Profile
User avatar

Joined: Sat Jun 19, 2010 5:02 pm
Posts: 331
Location: Mekkan
Reply with quote
Post 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.


Sun Jun 27, 2010 3:36 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 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.029s | 13 Queries | GZIP : Off ]