I would like to build a elevator in the game(the one we use in daily life - a box-like one), that I have some problem on understanding the documents, and I have a few questions.
1. Can a model be scripted, that I use a hollow cube to make the elevator body and mark it as a "model", and do animation on it. Can I use a script to control it movement of the lift respond to the player's choice. That once the player approaches, a dialog opens to ask which floor he/she would like to go, and go to the distination.
2. Where are the scripts placed on, with the source files, or in the RF directory?
3. How the script is linked with the objects?
Please advice, and thank you very much. (It was the first time I use this software, and this is the 1st homework in my gaming course in school)
About scripting of model
Re: About scripting of model
Hello and welcome to the forums.
To your first question: A dialog might not be the easiest way, as it would use much much scripting. Actually elevators can get really hard to do, if you want them so how they are in real life (press a specific button etc..). It's funny but another forum member asked a question about elevators just a few days ago.
http://www.realityfactory.info/forum/vi ... tor#p31690
There was once a demo level floating around showing an elevator. (Maybe it even is included into the official RF installation). Well, sadly i don't know exactly how to do elevators in RF, because i never did it (i am a fan of fantasy-rpgish games and so i use stairs instead
They also look alot cooler). The demo level was even called elevator.3dt, if somebody finds it, it might be cool if you would upload it here. (When i am home, i am at university at the moment, i will look if i can find it and mybe upload it)
2. Scripts are placed in the /scripts underdirectory in the RF folder.
3. Normally you do this via a pawn. Or a level controller entity. A model cannot be scripted directly, meaning it cannot have its own script. It could be possible with a LevelController entity, or pawn scripting (you would not script the model directly, but from the pawn which owns the script, or from the level controller script). But i don't know if anyone has used LevelControllers before, i haven't. (I don't like models they are a bit restrictive in what you can do with them scripting-like)
It CAN be done, i have seen the demo level. But i don't know how... Sorry that i cannot help you any further.
What kind of school do you go to? Is it a 'game dev school' or are there 'game dev classes'? How old are you? And they teach RF? (Out of interest, if you don't want to answer you don't have to)
To your first question: A dialog might not be the easiest way, as it would use much much scripting. Actually elevators can get really hard to do, if you want them so how they are in real life (press a specific button etc..). It's funny but another forum member asked a question about elevators just a few days ago.
http://www.realityfactory.info/forum/vi ... tor#p31690
There was once a demo level floating around showing an elevator. (Maybe it even is included into the official RF installation). Well, sadly i don't know exactly how to do elevators in RF, because i never did it (i am a fan of fantasy-rpgish games and so i use stairs instead
2. Scripts are placed in the /scripts underdirectory in the RF folder.
3. Normally you do this via a pawn. Or a level controller entity. A model cannot be scripted directly, meaning it cannot have its own script. It could be possible with a LevelController entity, or pawn scripting (you would not script the model directly, but from the pawn which owns the script, or from the level controller script). But i don't know if anyone has used LevelControllers before, i haven't. (I don't like models they are a bit restrictive in what you can do with them scripting-like)
It CAN be done, i have seen the demo level. But i don't know how... Sorry that i cannot help you any further.
What kind of school do you go to? Is it a 'game dev school' or are there 'game dev classes'? How old are you? And they teach RF? (Out of interest, if you don't want to answer you don't have to)
Everyone can see the difficult, but only the wise can see the simple.
-----
-----
Re: About scripting of model
I'll just post this here as well. (Just to make my post count rise
)
The elevator level:
http://koti.mbnet.fi/jutkula/elevator071B.3dt
The elevator level:
http://koti.mbnet.fi/jutkula/elevator071B.3dt
Pain is only psychological.
-
victan7300
- Posts: 3
- Joined: Thu Nov 06, 2008 12:54 pm
Re: About scripting of model
Thank you very much of your help.
And for Jay's question, I am a undergraduate in a university, and the course is a year 3 course in BSc. Computer science, originally it teaches the theory of game engines, but the homeworks are making games through RF.
And for Jay's question, I am a undergraduate in a university, and the course is a year 3 course in BSc. Computer science, originally it teaches the theory of game engines, but the homeworks are making games through RF.
-
victan7300
- Posts: 3
- Joined: Thu Nov 06, 2008 12:54 pm
Re: About scripting of model
Besides, where is the ElevatorControl.s ?
Re: About scripting of model
Oh ya, sorry 'bout that. I didn't look at the level and I thought it's all there.
Here's the script:
http://koti.mbnet.fi/jutkula/ElevatorControl.s
BTW, welcome to the forums on my behalf too. I'm a CS student myself as well.
Here's the script:
http://koti.mbnet.fi/jutkula/ElevatorControl.s
BTW, welcome to the forums on my behalf too. I'm a CS student myself as well.
Pain is only psychological.
- metal_head
- Posts: 1244
- Joined: Sat Jan 05, 2008 8:31 pm
- Location: Bulgaria,Sofia
- Contact:
Re: About scripting of model
...that's why it wasn't working...sorry I was off to the gym and I couldn't tell you (Juutis) that it's missing
thanks!
Re: About scripting of model
Interesting... now we have 3 CS students here
I am studying informatics/Computer Science too. Started in October this year.
Everyone can see the difficult, but only the wise can see the simple.
-----
-----
- metal_head
- Posts: 1244
- Joined: Sat Jan 05, 2008 8:31 pm
- Location: Bulgaria,Sofia
- Contact:
Re: About scripting of model
Me too,at this point we are learning how to program in Turbo Pascal,but the nex year we are startgin to learn C. We also study Flash.Interesting... now we have 3 CS students here I am studying informatics/Computer Science too. Started in October this year.