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.

3 Dimensional Chat / Help 3d Model Cant make it move With user Keys

Author
Message
Random 69
21
Years of Service
User Offline
Joined: 24th Aug 2004
Location: Marshmellowland
Posted: 25th Aug 2004 08:29
Ok its hard to explain i want my model to move when i press up the i want the model to walk forward and left right back you get the picture but i cant do it worth a crap so can u please help me check out the code ive done so far

Also could you tell me why it doesnt texture it i need to no about how to get the model to move more though

I need models email me
Mucky Muck Ninja
22
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 25th Aug 2004 09:04
wrong forum buddy.
If you're trying to get the character to walk, you have to move the object, and play its stored animation.

If upkey()=1
Move object YourCharacter,Speed
Loop object YourCharacter,WalkStartFrame,WalkEndFrame
endif

if upkey()=0 then stop object YourCharacter

Am I an Idiot...or is everyone else just really smart?
i am foonman305
Random 69
21
Years of Service
User Offline
Joined: 24th Aug 2004
Location: Marshmellowland
Posted: 25th Aug 2004 11:21
WRONGO did not work

I need models email me
Mucky Muck Ninja
22
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 25th Aug 2004 11:55
Does your model have an animation?
Also, try instead of Move object
CharacterX=NewXvalue(CharacterX,CharacterAngle,Speed)
CharacterZ=NewZvalue(CharacterZ,CharacterAngle,Speed)

Am I an Idiot...or is everyone else just really smart?
i am foonman305
Random 69
21
Years of Service
User Offline
Joined: 24th Aug 2004
Location: Marshmellowland
Posted: 25th Aug 2004 11:56
My model DOES not have a animation does that matter?

I need models email me
Random 69
21
Years of Service
User Offline
Joined: 24th Aug 2004
Location: Marshmellowland
Posted: 25th Aug 2004 12:16
I have a animated model now and i am trying to test out your awsome command but the problem is my program loads up the model and everything but the program then ends cuss i have nothing stopping it so how do i stop it thanks

my source is there

I need models email me
Mucky Muck Ninja
22
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 25th Aug 2004 12:25 Edited at: 25th Aug 2004 12:32
Looks like you need to look at the starting tutorials. Are you using DBPro, or Classic? Go to the tutorials and do the monster hunt tutorial. Your prob is you don't have a Do Loop sequence. You should put all your setup before the Do Loop sequence, then put the IFs and stuff inside Do and loop. When the compiler sees DO, it turns on a flag to return to it when it sees the corresponding keyword, LOOP. This way your prog never ends until you press ESC. It should look like this.

Do all your setup here(loading models, setting variables, ect)



REM Main Loop***
Do

Put all you're IF's, and the game engine in here.


REM sync is to refresh the screen so that you can see everything that is new
sync
Loop



I can't explain it all to you so you should look in the help, tutorials, and post your questions in the right forum too.

Im guessing your type help to see controls doesn't work?
It should be
If input$="help" then print "Commands here"

Am I an Idiot...or is everyone else just really smart?
i am foonman305
JeBuS
21
Years of Service
User Offline
Joined: 20th Jul 2004
Location: Undisclosed Location, Dominion of JeBuS
Posted: 25th Aug 2004 12:25
If that's your whole program, you are missing a loop. I suggest you go read the tutorials about loops. Oh, and look up the command sync as well..
Random 69
21
Years of Service
User Offline
Joined: 24th Aug 2004
Location: Marshmellowland
Posted: 25th Aug 2004 12:35
I use pro one sec reading what ure saying umm feel free to add me to msn messenger [email protected] to chat if u want

I need models email me
Random 69
21
Years of Service
User Offline
Joined: 24th Aug 2004
Location: Marshmellowland
Posted: 25th Aug 2004 12:38
thanks hmm testing it now and it says command out of place
ok well look at my code



cls
rem Starts the game Asking for controls
Print " Ok Welcome To The Awakening A Hack n Slash Rpg that will be ported online in the far future."
rem input "Type Help For controls>" ;$controls
rem If "$controls" = help then print " Controls here"

rem sets up game
set display mode 800,600,16
position camera 1000,1000,1000
make matrix 1,2000,2000,130,130

rem Loads the model and textures it

load object "E:\Documents and Settings\Evan\Desktop\crap\crap\Models And Textures\Dwarf\dwarf2.x",1
scale object 1,10,10,10
position object 1,0,0,100


REM Main Loop***
Do


rem Dwarf Attacking


rem Attack 1 - Swipe axe
if keystate(30)=1 then PLAY OBJECT 1, 112, 126
endif
if scankey(30)=0 then stop object 1
rem Attack 2 - Jump and overhead whack attack
if keystate(31)=1 then PLAY OBJECT 1, 128, 142
endif
if scankey(31)=0 then stop object 1
rem Attack 3 - 360 spin Back hander
if keystate(32)=1 then PLAY OBJECT 1, 144, 160
endif
if scankey(32)=0 then stop object 1
rem Attack 4 - 2 Swipes left and right
if keystate(16)=1 then PLAY OBJECT 1, 162, 180
endif
if scankey(16)=0 then stop object 1
rem 182-192 Attack 5 - Stab
if keystate(17)=1 then PLAY OBJECT 1, 182, 192
endif
if scankey(17)=0 then stop object 1
rem Block
if keystate(18)=1 then PLAY OBJECT 1, 194, 210
endif
if scankey(18)=0 then stop object 1

Rem Dwarf Walking
If upkey()=1
Move object 1,2.5
Loop object 1,2,14
endif

if upkey()=0 then stop object 1

rem Dwarf Running

if keystate(82)=1 then PLAY OBJECT 1, 16, 26
if keystate(82)=1
Move object 1,5
Loop object 1,16,26
endif

if scankey(82)=0 then stop object 1

Rem Dwarf Crouching
if scankey(46)=1 then PLAY OBJECT 1, 56, 59
endif

if scankey(46)=0 then stop object 1
rem Dwarf Jumping

if scankey(79)=1 then PLAY OBJECT 1, 28, 40

endif

if scankey(79)=0 then stop object 1

rem Nod yes or No

if scankey(21)=1 then PLAY OBJECT 1, 253, 272
endif
if scankey(21)=0 then stop object 1
if scankey(49)=1 then PLAY OBJECT 1, 274, 290
endif
if scankey(49)=0 then PLAY OBJECT 1, 274, 290








rem end stuff

sync
Loop


ok and now it says the endif is out of place do i need al those endifs or not???

I need models email me
Random 69
21
Years of Service
User Offline
Joined: 24th Aug 2004
Location: Marshmellowland
Posted: 25th Aug 2004 12:40
umm i took al the endifs out and now it says my loop is out of place

I need models email me
Mucky Muck Ninja
22
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 25th Aug 2004 12:43 Edited at: 25th Aug 2004 12:49
You don't need an endif if you have a then.
EX:
REM no endif needed
If blah then blah

REM endif needed
If blah
blah
blahblah
blah
endif

You can also do this
If blah then blah : blah : blah : blah

This is how your code should be:
cls
rem Starts the game Asking for controls
Print " Ok Welcome To The Awakening A Hack n Slash Rpg that will be ported online in the far future."
rem input "Type Help For controls>" ;controls$
rem If controls$ = "help" then print " Controls here"

rem sets up game
set display mode 800,600,16
position camera 1000,1000,1000
make matrix 1,2000,2000,130,130

rem Loads the model and textures it

load object "Eocuments and SettingsEvanDesktopcrapcrapModels And TexturesDwarfdwarf2.x",1
scale object 1,10,10,10
position object 1,0,0,100


REM Main Loop***
Do


rem Dwarf Attacking


rem Attack 1 - Swipe axe
if keystate(30)=1 then PLAY OBJECT 1, 112, 126
if scankey(30)=0 then stop object 1
rem Attack 2 - Jump and overhead whack attack
if keystate(31)=1 then PLAY OBJECT 1, 128, 142
if scankey(31)=0 then stop object 1
rem Attack 3 - 360 spin Back hander
if keystate(32)=1 then PLAY OBJECT 1, 144, 160
if scankey(32)=0 then stop object 1
rem Attack 4 - 2 Swipes left and right
if keystate(16)=1 then PLAY OBJECT 1, 162, 180
if scankey(16)=0 then stop object 1
rem 182-192 Attack 5 - Stab
if keystate(17)=1 then PLAY OBJECT 1, 182, 192
if scankey(17)=0 then stop object 1
rem Block
if keystate(18)=1 then PLAY OBJECT 1, 194, 210
if scankey(18)=0 then stop object 1

Rem Dwarf Walking
If upkey()=1
Move object 1,2.5
Loop object 1,2,14
endif

if upkey()=0 then stop object 1

rem Dwarf Running

if keystate(82)=1 then PLAY OBJECT 1, 16, 26
if keystate(82)=1
Move object 1,5
Loop object 1,16,26
endif

if scankey(82)=0 then stop object 1

Rem Dwarf Crouching
if scankey(46)=1 then PLAY OBJECT 1, 56, 59


if scankey(46)=0 then stop object 1
rem Dwarf Jumping

if scankey(79)=1 then PLAY OBJECT 1, 28, 40



if scankey(79)=0 then stop object 1

rem Nod yes or No

if scankey(21)=1 then PLAY OBJECT 1, 253, 272
if scankey(21)=0 then stop object 1
if scankey(49)=1 then PLAY OBJECT 1, 274, 290
if scankey(49)=0 then PLAY OBJECT 1, 274, 290








rem end stuff

sync
Loop

Am I an Idiot...or is everyone else just really smart?
i am foonman305
Random 69
21
Years of Service
User Offline
Joined: 24th Aug 2004
Location: Marshmellowland
Posted: 25th Aug 2004 12:47
UMm what about my out of place loop

oh and i got a level 51 runescape crit ill give u for some kickass models and neverending help

I need models email me
Random 69
21
Years of Service
User Offline
Joined: 24th Aug 2004
Location: Marshmellowland
Posted: 25th Aug 2004 12:48
ahh sorry
ure awsome now it says variable scankey does not exist in program wtf



I need models email me
Random 69
21
Years of Service
User Offline
Joined: 24th Aug 2004
Location: Marshmellowland
Posted: 25th Aug 2004 12:51
i changed all the scankeys to keystates but it says variable keystate name is not valid at line 28 Whats wrong with my program

I need models email me
Mucky Muck Ninja
22
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 25th Aug 2004 12:51
its scancode not scankey.

Am I an Idiot...or is everyone else just really smart?
i am foonman305
JeBuS
21
Years of Service
User Offline
Joined: 20th Jul 2004
Location: Undisclosed Location, Dominion of JeBuS
Posted: 25th Aug 2004 12:55
You should head over to the Newcomer's forum.
Random 69
21
Years of Service
User Offline
Joined: 24th Aug 2004
Location: Marshmellowland
Posted: 25th Aug 2004 12:55
now it says paramter mismatch at line 28 in expresion scancode

grrr Help PLEASEE

and what u say about the runescape guy i dont play anymore?

I need models email me
Mucky Muck Ninja
22
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 25th Aug 2004 12:57 Edited at: 25th Aug 2004 12:58
show me line 28

i agree, go to the newcomers corner. No question is too obvious for the newcomers corner.


i prefer to do my own work in games like runescape, it would be boring to start out super far.

Am I an Idiot...or is everyone else just really smart?
i am foonman305
Random 69
21
Years of Service
User Offline
Joined: 24th Aug 2004
Location: Marshmellowland
Posted: 25th Aug 2004 12:59
if scancode(30)=0 then stop object 1

ill go there when this program runs succesfully once then ill move my questions there

I need models email me
Mucky Muck Ninja
22
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 25th Aug 2004 13:05
That is how keystate works.
EX:
If scancode()=30 then stop object 1

If keystate(30)=1 then stop object 1

Am I an Idiot...or is everyone else just really smart?
i am foonman305
Random 69
21
Years of Service
User Offline
Joined: 24th Aug 2004
Location: Marshmellowland
Posted: 25th Aug 2004 13:08
WHAAAAAAAAAAAAAAAAAAAA?

I need models email me
JeBuS
21
Years of Service
User Offline
Joined: 20th Jul 2004
Location: Undisclosed Location, Dominion of JeBuS
Posted: 25th Aug 2004 13:11
Read the manual.
Random 69
21
Years of Service
User Offline
Joined: 24th Aug 2004
Location: Marshmellowland
Posted: 25th Aug 2004 13:14
manaul theres a manaul where do i get this mAnaul and if ure talking about help i have the light version so they cant give me examples

I need models email me
Random 69
21
Years of Service
User Offline
Joined: 24th Aug 2004
Location: Marshmellowland
Posted: 25th Aug 2004 13:15
got it just updateing code now

I need models email me

Login to post a reply

Server time is: 2026-07-07 19:58:32
Your offset time is: 2026-07-07 19:58:32