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 / My model doesn't show

Author
Message
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 30th Sep 2004 09:44 Edited at: 30th Sep 2004 11:08
I can't belive this I have managed to get things working so that I can get the player object into the vehicle and................ the vehicle model now doesn't show anymore, what is going on? my tank model was working and now it doesn't? I replaced the model with a testbox model as I know people don't have my models can anybody help me?

Not only that my player object model doesn't work. It doesn 't get appended by the walk.x model animation Can anyone hep me please?


vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 1st Oct 2004 12:38
No help?
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 2nd Oct 2004 13:33
Sorry Vampyre,
I was going to look at your code but haven't had the time lately, real life getting in the way. Perhaps someone can pick the slack or you'll spot it on your own in time, or I can get to it when things slow down.
Good luck,
S.

Any truly great code should be indisguishable from magic.
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 2nd Oct 2004 17:49
OK thanks SandraD
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 2nd Oct 2004 19:59
just suggestions at the moment since I am busy, how about set object cull? on or off? could be that when the player character is inside then he gets culled or something and with it being glued it acts weird, or if you are glueing objects together then you will find that glue object to limb likes the the base object you are glueing too to be made from a mesh for some reason, you need to do

make mesh from object 1,1
delete object 1
make object 1,1,1

then you can glue to the object, otherwise you get all sorts of weirdness when you try to glue, even when objects are in the correct position they get misplaced or rescaled or whatever, you could try that, maybe when you glue the vehicle is getting repositioned out of sight or something, just a suggestion.

Mentor.

PC1: P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 3rd Oct 2004 05:02 Edited at: 3rd Oct 2004 05:10
I see OK but first of all I got to make the vehicle visible I t is just not showing at all Mentor,

I am dreading adding Friendly and enemy A.I
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 5th Oct 2004 21:04
I am still needing a lot of help with this
computer
20
Years of Service
User Offline
Joined: 5th Oct 2004
Location:
Posted: 5th Oct 2004 21:47
I see your code calls

do
gosub _UpdateHovertank
gosub _UpdatePlayer
loop

do

_UpdatePlayer:

return

rem If character action changes
IF stage<>oldstage
IF stage=0
SET OBJECT FRAME 1,0.0
LOOP OBJECT 1,0,20
SET OBJECT SPEED 1,10
ENDIF
IF stage=1
SET OBJECT FRAME 1,25
LOOP OBJECT 1,105,125
SET OBJECT SPEED 1,40
ENDIF
oldstage=stage
ENDIF

rem check distance from vehicle
if (playerX#-hovercraftX#)^2+(playerZ#-hovercraftZ#)^2 <=160

rem If chartacter collides with vehicle
if object collision(1,2)=2
rem get into vehicle and make sure pilot is not detected anymore
glue object to limb 1,2,23
position object 1,0,0,0
invehicle=1
set object collision off 1
hide object 1
rem When spacebar is hit, drop the cone
if spacekey()=1
invehicle=0
unglue object 1
set object collision on 1
endif
endif
endif

rem load hovercraft object
load object "testbox.X", 2

rem Rotate and fix data so character faces right way
xrotate object 2,0
yrotate object 2,360
zrotate object 2,0
fix object pivot 2

X# = object position X(2)
Z# = object position Z(2)
Y# = Get ground height(1,X#,Z#)
Position object 2,x,150,y
AngleY# = 0.0

rem scaling to 10% (YOU WILL NEED TO ADJUST THIS)
scale object 2,3000,3000,3000
rem movement

_UpdateHovertank:

return

If invehicle=1
rem HAT control
jhat=joystick hat angle(0)

text 10,10,"HAT signal: "+str$(jhat)
text 10,20,"Joystick: "+str$(jx)+"/"+str$(jy)
text 10,30,"Slider: "+str$(joystick slider a())
text 10,40,"FPS: "+str$(screen fps())

rem Set the hat look flags to nothing
lookUp = 0: lookLeft = 0: lookRight = 0: lookBack = 0
if jhat = 0 then lookUp = 1
if jhat=9000 or jhat=4500 or jhat=13500 then lookRight = 1
if jhat=31500 or jhat=27000 or jhat=22500 then lookLeft = 1
if jhat = 18000 then lookBack = 1
endif
else

If InKey$() = "1" Then cammode = 1 : ` third person
If InKey$() = "2" Then cammode = 0 : ` first person

If cammode = 0

rem Place camera and set orientation to object for FPS
position camera object position x(1),object position y(1)+40,object position z(1)
set camera to object orientation 1

if lookRight = 1 then turn camera right 90.0
if lookLeft = 1 then turn camera left 90.0
if lookUp = 1 then pitch camera up 45.0
if lookBack = 1 then turn camera right 180.0
else


rem Place as over head for 3rd person

move object 1,-150
position object 3,object position x(1),object position y(1),object position z(1)
move object 1,150



rem Place camera and set orientation to object
position camera object position x(3),object position y(3),object position z(3)
set camera to object orientation 1
endif
endif
endif
sync
loop



but never runs any of this code? Is this true?

bleep bleep
computer
20
Years of Service
User Offline
Joined: 5th Oct 2004
Location:
Posted: 7th Oct 2004 04:09
Is my new account still having problems?

bleep bleep
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 7th Oct 2004 23:50
No it runs the code but the hovertank model wasn't appearing at all computer sorry I took so long to reply,

I would get the player object model and that would be it I am still stucxk as how to get the other model to appear @Mentor I tried your mesh code to get the models to appear for both models but still the hovcertank doesn't appear Mentor I just can't understand what is going wrong?
computer
20
Years of Service
User Offline
Joined: 5th Oct 2004
Location:
Posted: 8th Oct 2004 02:49
Have you updated or got any of the new patches? If you look here http://216.239.59.104/search?q=cache:cbPSvj3vBxcJ:forum.thegamecreators.com/%3Fm%3Dforum_view%26t%3D29734%26b%3D15+model+disappear+site:http://forum.thegamecreators.com&hl=en look in patch 3 (if this applies to you) 5.6

Have you altered any code? Any previous saves you can go back to? Have you opened your models in any programs other than DB?

bleep bleep
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 13th Oct 2004 00:03 Edited at: 13th Oct 2004 00:04
No computer I am using DBC enhanced 1.13 sorry again for the long non reply

I have prevoius saves and no I diddn't alter any code
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 13th Oct 2004 06:06
Can anyone help me with this code ?

Login to post a reply

Server time is: 2025-05-24 19:50:58
Your offset time is: 2025-05-24 19:50:58