View unanswered posts | View active topics It is currently Thu Dec 26, 2024 6:03 pm



Reply to topic  [ 740 posts ]  Go to page Previous  1 ... 37, 38, 39, 40, 41, 42, 43 ... 50  Next
 Ballistic Weapons: Mercenaries! ))AAL Discussion 
Author Message
User avatar

Joined: Mon Jun 30, 2008 9:13 pm
Posts: 499
Location: Finland
Reply with quote
Post Re: Ballistic Weapons: Mercenaries! ))AAL Discussion
Docking bay:
Code:
function Update(self)
for actor in MovableMan.Actors do
  if (actor.ClassName == "ACDropShip") and (actor.AIMode == Actor.AIMODE_STAY) and (math.abs(actor.Pos.X - self.Pos.X) < 30) and (math.abs(actor.Pos.Y - self.Pos.Y) < 30) then
    actor.Vel = Vector(0,0)
    actor.Pos = Vector(self.Pos.X + offsetx, self.Pos.X + offsety)  --replace offsets with values that place the dropship in a nice position
  end
end
end

This basically pins any dropships which have their aimode set to stay. To undock just set it to return. Random gibbing may be caused by the dropship being inside the terrain like it seems to be.


Sat May 09, 2009 6:43 pm
Profile
User avatar

Joined: Sun Nov 11, 2007 1:49 pm
Posts: 785
Reply with quote
Post Re: Ballistic Weapons: Mercenaries! ))AAL Discussion
You're a god at Cortex Command lua.


Sat May 09, 2009 6:54 pm
Profile
User avatar

Joined: Mon Apr 28, 2008 1:35 am
Posts: 383
Reply with quote
Post Re: Ballistic Weapons: Mercenaries! ))AAL Discussion
piipu wrote:
Docking bay:
Code:
function Update(self)
for actor in MovableMan.Actors do
  if (actor.ClassName == "ACDropShip") and (actor.AIMode == Actor.AIMODE_STAY) and (math.abs(actor.Pos.X - self.Pos.X) < 30) and (math.abs(actor.Pos.Y - self.Pos.Y) < 30) then
    actor.Vel = Vector(0,0)
    actor.Pos = Vector(self.Pos.X + offsetx, self.Pos.X + offsety)  --replace offsets with values that place the dropship in a nice position
  end
end
end

This basically pins any dropships which have their aimode set to stay. To undock just set it to return. Random gibbing may be caused by the dropship being inside the terrain like it seems to be.


is there an AIMODE_STAY ? -oh never mind, it's for crafts. right.
but can you use it as a condition?
if you can, that's really cool, and it means we can lua in all sorts of AI modes already, as long as we use custom scenes.


Sat May 09, 2009 7:37 pm
Profile

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post Re: Ballistic Weapons: Mercenaries! ))AAL Discussion
piipu wrote:
Docking bay:
Code:
function Update(self)
for actor in MovableMan.Actors do
  if (actor.ClassName == "ACDropShip") and (actor.AIMode == Actor.AIMODE_STAY) and (math.abs(actor.Pos.X - self.Pos.X) < 30) and (math.abs(actor.Pos.Y - self.Pos.Y) < 30) then
    actor.Vel = Vector(0,0)
    actor.Pos = Vector(self.Pos.X + offsetx, self.Pos.X + offsety)  --replace offsets with values that place the dropship in a nice position
  end
end
end

This basically pins any dropships which have their aimode set to stay. To undock just set it to return. Random gibbing may be caused by the dropship being inside the terrain like it seems to be.


Now that was unexpected. :P
So if I got this right, I'll add this to an MOSR just like the modules and when the ship is within range of 30 pixels, it will pin and align itself with the docking unit.

Those offsetx/y will probably need some trial and error testing, but damn, this is awesome. I was intending to make a similar for rockets that are on the ground from keeping them from dancing and hold them tight.

Thank you! :smile:


Sat May 09, 2009 8:30 pm
Profile
User avatar

Joined: Wed Jan 14, 2009 7:12 pm
Posts: 1525
Location: In between your sister's legs, showing her how to use a... PS3 controller!
Reply with quote
Post Re: Ballistic Weapons: Mercenaries! ))AAL Discussion
war_man333 wrote:
You're a god at Cortex Command lua.

No, Lord Tim is a god at CC Lua. This guy's just the pope.


Sat May 09, 2009 8:33 pm
Profile
User avatar

Joined: Mon Jun 30, 2008 9:13 pm
Posts: 499
Location: Finland
Reply with quote
Post Re: Ballistic Weapons: Mercenaries! ))AAL Discussion
numgun wrote:
So if I got this right, I'll add this to an MOSR just like the modules and when the ship is within range of 30 pixels, it will pin and align itself with the docking unit.

Yup, that's how it works. I'm not at all sure if aimode_stay works though. But it propably will.
Edit: ^sig'd, lol


Sat May 09, 2009 8:35 pm
Profile
User avatar

Joined: Sun Jun 22, 2008 12:29 pm
Posts: 95
Location: edin scotland gb eu europe
Reply with quote
Post Re: Ballistic Weapons: Mercenaries! ))AAL Discussion
I have played ut2004 bw and it is great i must say :grin:
I have experience beta testing just to say so if you want i can help


Last edited by 2v50 on Sun May 10, 2009 8:17 am, edited 1 time in total.



Sat May 09, 2009 8:45 pm
Profile
User avatar

Joined: Mon Jun 30, 2008 9:13 pm
Posts: 499
Location: Finland
Reply with quote
Post Re: Ballistic Weapons: Mercenaries! ))AAL Discussion
Tried the aimode_stay, it works.


Sat May 09, 2009 8:49 pm
Profile
User avatar

Joined: Wed Apr 22, 2009 1:51 am
Posts: 104
Location: Pennsylvania
Reply with quote
Post Re: Ballistic Weapons: Mercenaries! ))AAL Discussion
2v50 wrote:
I have played ut2004 bw and it is great i must say :grin:
now then i just have to ask do you have a pc user using the mac build test i not then i can help with that.

Wait, wait, wait. A PC user testing the mac build? Really? I can tell you how your test will work. It won't. Because it's the equavalent of seeing if the square peg will fit in the round hole. God save me from noobs.


Sat May 09, 2009 10:49 pm
Profile YIM
User avatar

Joined: Sun Nov 11, 2007 1:49 pm
Posts: 785
Reply with quote
Post Re: Ballistic Weapons: Mercenaries! ))AAL Discussion
2v50 wrote:
I have played ut2004 bw and it is great i must say :grin:
now then i just have to ask do you have a pc user using the mac build test i not then i can help with that.



Stupidity of the day! Hooray!


Sat May 09, 2009 11:08 pm
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Ballistic Weapons: Mercenaries! ))AAL Discussion
that section of map down the bottom of the image looks delicious.


Sun May 10, 2009 12:22 am
Profile WWW
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Ballistic Weapons: Mercenaries! ))AAL Discussion
2v50 wrote:
now then i just have to ask do you have a pc user using the mac build test i not then i can help with that.
Translated to:
2v50 wrote:
Do you have a beta-tester testing this on the Mac-build resources for PC? If not, I can help in this regard.
I think he thinks that you're beta-testing in B22, which you have before made clear you are not. In this way it will be unnecessary for him to do so, as the main way that mac-build resources are different from the PC-build resources will most likely be re-aligned in B23.


Sun May 10, 2009 5:24 am
Profile WWW
User avatar

Joined: Sun Jun 22, 2008 12:29 pm
Posts: 95
Location: edin scotland gb eu europe
Reply with quote
Post Re: Ballistic Weapons: Mercenaries! ))AAL Discussion
Quote:
Stupidity of the day! Hooray!


How??
So that you know it works better then the pc build for right now.


Quote:
Wait, wait, wait. A PC user testing the mac build? Really? I can tell you how your test will work. It won't. Because it's the equavalent of seeing if the square peg will fit in the round hole. God save me from noobs.

Go check out the fourms noob!

Well Well Well
It works and has done for a good little while now. I am using it all the time on my pc now because i have got the error where the game deletes most of the the Settings.ini file. That is why i am useing the mac build on a pc


Sun May 10, 2009 8:11 am
Profile
User avatar

Joined: Sun Nov 11, 2007 1:49 pm
Posts: 785
Reply with quote
Post Re: Ballistic Weapons: Mercenaries! ))AAL Discussion
No.
No no no no, you can't be using a mac build on your PC, I think you mean the IGF build.
You cannot use Mac programs on a PC. DO YOU UNDERSTAND?


Sun May 10, 2009 9:08 am
Profile
User avatar

Joined: Wed Jan 14, 2009 7:12 pm
Posts: 1525
Location: In between your sister's legs, showing her how to use a... PS3 controller!
Reply with quote
Post Re: Ballistic Weapons: Mercenaries! ))AAL Discussion
Look up mac resources on a PC. In mod releases.


Sun May 10, 2009 11:54 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 740 posts ]  Go to page Previous  1 ... 37, 38, 39, 40, 41, 42, 43 ... 50  Next

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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.073s | 13 Queries | GZIP : Off ]