View unanswered posts | View active topics It is currently Sat Dec 28, 2024 2:15 pm



Reply to topic  [ 4 posts ] 
 Enemies are out of the screen 
Author Message

Joined: Fri Nov 27, 2009 10:43 pm
Posts: 4
Reply with quote
Post Enemies are out of the screen
Hi everyone ! I am from Ukraine, so sorry for mistakes in my text :oops:
I have one problem with my Cortex Command, in some of the scenes, that are non cyclic, enemies die out of the screen, so i don't see any of them or their craft. :???:
How can i solve this problem ? :oops:
Thanks.


Sun Nov 29, 2009 11:47 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Enemies are out of the screen
I suppose you could fix it with a simple Lua script. If you have not modded and thus do not know how to attach Lua scripts to actors, then this will not make any sense to you, and you should make a request in the request subforum for it's implementation.

Code:
function Create(self)
  self.sceneBox = Box(0, 0, SceneMan.SceneWidth, SceneMan.SceneHeight);
  self.checkTimer = Timer();
end

function Update(self)
  if self.checkTimer:IsPastSimMS(500) then
    for actor in MovableMan.Actors do
      if not self.sceneBox:WithinBoxX(actor.Pos) then
        actor.Pos.X = Math.random(0, SceneMan.SceneWidth)
      end
    end
    self.checkTimer:Reset()
  end
end


I did not test this, but going by the Wiki it looks to be alright. There may be some errors, such as SceneMan may be SceneManager...

EDIT: Forgot to end Create().


Sun Nov 29, 2009 1:41 pm
Profile

Joined: Fri Nov 27, 2009 10:43 pm
Posts: 4
Reply with quote
Post Re: Enemies are out of the screen
Thank you, but i don't know how to do it :???:
May be you can explain me it on example ?


Sun Nov 29, 2009 6:24 pm
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: Enemies are out of the screen
It's a known bug. My hope is that it'll be solved in B24. :???:


Sun Nov 29, 2009 6:30 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 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.026s | 13 Queries | GZIP : Off ]