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 / Straffing without Using NewValue() Command

Author
Message
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 26th Apr 2005 19:26
Yes can someone help me please I have managed to get my aircraft to take of and land vertically but I can't get it to straffe as I am using the Free Flight Orientation commands.

Is there a way I can get an object to straffe using a dioffrent set of commands because I simply cannot get the Newvalue commands to work with the Free Flight Orientation commands

Please help , thanks
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 26th Apr 2005 19:51
Turn camera left 90 degrees.
Move camera forward or back by the straffe amount.
Turn camera right 90 degrees.

That's how I used to do it - just use the camera as a vehicle to offset the straffe at 90 degrees from it's Y orientation.


Van-B

Quote: "How could I condescend you?, you don't even know what it means!"

Van-B's mom.
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 26th Apr 2005 21:05 Edited at: 26th Apr 2005 21:05
I see well I shall try this Van B, thanks
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 26th Apr 2005 21:14
Er I am having problems with it i.e. it doesn't work am I doing this right Van B? I have put the code up so you can have a look
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 26th Apr 2005 21:23 Edited at: 26th Apr 2005 21:24
Sorry used turn object left still how would I attach the object to the camera when straffing left or right?
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 26th Apr 2005 21:41
Ahh, I assumed you were using the camera for the player (like in FPS games).

This should work:

if joystick slider b()=0
turn object left 2,90 : move object 2,1 : turn object right 2,90
endif
if joystick slider b()=65535
turn object right 2,90 : move object 2,1 : turn object left 2,90
endif

You have to turn 90 degrees, move, then turn back the other way so when you sync the object is facing the same way as the last time yet it's straffed.


Van-B

Quote: "How could I condescend you?, you don't even know what it means!"

Van-B's mom.
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 26th Apr 2005 21:56
Thanks Van B
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 26th Apr 2005 22:10
Yes Thanks Van B That worked a treat although I stupidly put joystick slider b intstead of joystick twist x but got it working now as I already had Joystick slider B assigned to vertical Take off and landing, still got it thanks your help couldnd't help me with getting a pilot in andn out of vehicles using models which is something I am really stuck on could you? LOL still thanks a lot Van B
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 26th Apr 2005 22:24 Edited at: 26th Apr 2005 22:27
Cool, glad you got it working.

For your pilot in/out problem I'm not sure how much I could help. Really, you should make a dummy prop mesh for each vehicle - and on each vehicle you'd have a fake limb to signify the exit and entrance point.

For example, if you have a jet, you could be strict and say that the player has to go to a little ladder beside the cockpit to enter the vehicle, like they can't just enter the vehicle from anywhere.

So, you'd have a jet model with a limb at the rough position that the player would have to be in. Now you could use that limb in a distance check, like the distance between the player object and that limb can be measured easily, and if it's within a certain range then it's possible to enter the vehicle, otherwise the player needs to find the right way in.

This is more about ease of programming than semantics, there's good reasons to be so strict.

Now, with that jet - you have to make a basic prop mesh from it - it could be the actual model itself, it depends on how you like to work, but you'd load this mesh into your animation program and stand the guy on the limb position that you set already. Like you'd offset the jet so that the limb is at 0,0,0. Now, you would animate the dude getting into the jet however you like.

Then in DBPro you would check for the vehicle in/out key, and if it's pressed, and the player is within range of the limb - you would position the player exactly on the limb, and rotate him to the same orientation as the jet. Then it's a case of playing that animation. With that method you could be as elaborate as you like with the animation, and once he's sitting - you would copy that frame over and centre him again, so when the frame number of the 'in' animation reaches the point where he sits down, you would switch to the centred sitting position.

The same method should be applied to exiting vehicle, like exit them in the same place as they get in. This same animation could cater for all your planes though, that's why I suggest using a template prop mesh for lining up purposes rather than the actual model.

Quote: "How could I condescend you?, you don't even know what it means!"

Van-B's mom.
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 26th Apr 2005 23:21 Edited at: 26th Apr 2005 23:24
Well I would be strict with getting into a jet but I wanted to have two types of getting into and out of a vehicle on the ground say a hovertank (because I get this and my game will be nearly finished) still what would happen with method one which is the Battlezone (98 R.T.S) And Battlezone 2 methond would be you can get into a vehicle but you have to press a key to get out.

The second method would be the player or A.I pilot would have to be at the door of a vehicle to get in.

I did try the limbs thing but I got strange problems the tank endned up underneath the matrix and the pilot either didn't load or was invisible so I must have hit a bug or I dod something wrong,
No the pilot was visible and the tank was invisble as it was under the matrix, still I didn't make a mesh last time of both objects so posibbly that was my mistake but I am not sure
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 27th Apr 2005 01:11
The problem is that you'd need a animation software package to animate your guy getting into the jet - the only other option beside animating yourself is to go for a simpler effect, like scaling down and scaling up again inside the jet, like a warp effect - but it depends on what sort of game your making whether that would work.


Van-B

Quote: "How could I condescend you?, you don't even know what it means!"

Van-B's mom.
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 27th Apr 2005 06:45 Edited at: 29th Apr 2005 09:15
Oh I see, then that means buying DBPro because Dark Basic Classic you have to do the animation yourself the long hard way. I tried to get it to read Poser animations and it was no go

Login to post a reply

Server time is: 2025-05-23 11:28:26
Your offset time is: 2025-05-23 11:28:26