Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Objects attracting other objects

Author
Message
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 23rd Aug 2004 02:35
Sorry for the double post, psted my question in the wrong forum , still how do I get objects to attact other objects as I want to get A.I pilots to go to empty vehicles like hovertanks e.t.c. or back to bases to get another vehicle.

I think I know how to get them to attach but I would need to knoow how to change their state so they could drive the hovertank or fly a plane, how would I do that please? and how can I make more than one A.I enter a vehicle and be carried by that vehicle , say a Starship? You have A.I helm , crew and the player but the player can take back control from the A.I but the A.I can pilot the ship how would that work?
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 23rd Aug 2004 20:47
your going to need a distance function, check if the player is within a certain amount of space of the vehicle and then enact on the mount the vehicle code, usually denoted by a keypress.

If no-one gives your an answer to a question you have asked, consider:- Is your question clear.- Did you ask nicely.- Are you showing any effort to solve the problem yourself
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 24th Aug 2004 01:05
Yes I have been trying to adapt the player distance thing from the monster hunts example indi, also I am not going to use a keypress for the pilot to mount the object just if they get really close 1ess than 0 and the vehicle is empty then they can get it if it is a one man hovertank , if it is a four man and a slot is empty then thay can also get it, they can't if it is an full vehicle or an occupied enemy vehicle. I would need to know how I could get 4 a.i into a tank or 3 a.i and a player into a four man tank

On the planets, vehicles would be for getting in and out and fighting with as the vehicles , like hovertanks and other vehicles would be quite common , I would also like to get the player and a.i pilots to eject if their vehicle is destroyed.

An AAPC 1(Armed Amoured Personnel Carrier) would pick up ejected pilots/drivers and then take them back to the nearest base.

In space I was going to leave it very simple , your ship explodes, you eject in a ejection pod which would have all the steering but very light weapons as the object would be to get back to your Mothership to pick up a new ship.

But how do I changes states and have open slots in vehicles for this?
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 3rd Sep 2004 19:52
I reeeally need to know this please someone?
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 7th Sep 2004 13:50
First you think of the design of the ships...where the slots for the escape pods would be. Then you keep checking if the player's pod is withing, say, 10 units of the position where it gets slotted on the mothership. You also have to make sure the angles are close...make sure the pod is lined up. If the distance is close enough, and the angle differences are small enough, then you change the game to whatever you want...an inside the mothership view...whatever.

Any help...or was that all stuff that you knew

Xander Moser of Bolt Software
Firewall: Your Computer's First Defense - Real Time Strategy game
[href][/href]
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 7th Sep 2004 21:58 Edited at: 8th Sep 2004 00:37
A little bit of help Bolt but I think I need a code example
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 8th Sep 2004 01:48
Well, I can't really write a code example, because I would be writing an entire program, and I don't really have time for that...you should attempt it and see if you can get it. Go for it, and if there is something you get stuck on, just ask.

Xander Moser of Bolt Software
Firewall: Your Computer's First Defense - Real Time Strategy game
[href][/href]
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 8th Sep 2004 02:02
OK I will I think I may have it now so I will try it.

Login to post a reply

Server time is: 2025-05-28 16:20:25
Your offset time is: 2025-05-28 16:20:25