|
FAQ
• Search • Login
|
Author |
Message |
CrazyMLC
Joined: Fri Dec 22, 2006 4:20 am Posts: 4772 Location: Good news everyone!
|
Re: Critical Hits by %?
Aw, just noticed before you posted. >.< As one might say: Ninja'd
|
Thu May 20, 2010 4:32 am |
|
|
Shyguy1994
Joined: Wed Nov 26, 2008 7:14 pm Posts: 33 Location: In front of my computer. Ba dum tish.
|
Re: Critical Hits by %?
Tried the new script, but still nothing (added a print command in the script to make sure). MLC might be right about the "no self.pos on MOPixels" thing. Which would not be cool.
Either that or Zombie Cave and critical hits don't mix.
The console doesn't display a single error, but it seems to completely ignore the script. Either that or script activation only happens after > 9k kills.
|
Fri May 21, 2010 3:17 am |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Critical Hits by %?
Try making it trigger 100% of the time for testing.
|
Fri May 21, 2010 8:21 am |
|
|
Shyguy1994
Joined: Wed Nov 26, 2008 7:14 pm Posts: 33 Location: In front of my computer. Ba dum tish.
|
Re: Critical Hits by %?
Got that too. Set the math.random(1,2) = 2, but still no dice.
|
Fri May 21, 2010 9:14 pm |
|
|
Kyred
Joined: Sun May 31, 2009 1:04 am Posts: 308
|
Re: Critical Hits by %?
Code: self.CritTimer:IsPastMS(250) This should be self.CritTimer:IsPastSimMS(250), if you haven't already caught that error yet. Also, self.Pos works on MOPixels. This is a proven fact. Half my mods would be impossible w/o it.
|
Sat May 22, 2010 7:54 am |
|
|
Shyguy1994
Joined: Wed Nov 26, 2008 7:14 pm Posts: 33 Location: In front of my computer. Ba dum tish.
|
Re: Critical Hits by %?
Kaput. I added the IsPastSimMS thing and it still doesn't work. Is there a more direct way we could get the script to activate? The console doesn't freak out when I use the axe, so there isn't anything inherently wrong with it I don't think.
|
Sat May 22, 2010 3:29 pm |
|
|
CrazyMLC
Joined: Fri Dec 22, 2006 4:20 am Posts: 4772 Location: Good news everyone!
|
Re: Critical Hits by %?
If this doesn't work, that means that the code itself isn't working: Code: --function Create(self) -- self.CritTimer = Timer() --end
function Update(self) for actor in MovableMan.Actors do -- local dist = SceneMan:ShortestDistance(self.Pos, actor.Pos, true).Magnitude -- if dist < 25 and self.CritTimer:IsPastMS(100) and math.random(1,20) == 20 then -- self.CritTimer:Reset() if actor.ClassName = "AHuman" then self.GoreAmount = math.random(1,3) for i = 1,self.GoreAmount do self.Gore = CreateAHuman(actor.PresetName) self.Gore.Vel = actor.Vel self.Gore.Pos = actor.Pos self.Gore.Sharpness = -231 MovableMan:AddActor(self.Gore); end end actor:GibThis() end if actor.Sharpness = -231 then actor:GibThis() end end end
|
Sat May 22, 2010 3:40 pm |
|
|
|
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
|
|