|
1 registered members (Grant),
3,476
guests, and 3
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
The most sillyest question, but please answer.....
#126480
04/26/07 06:25
04/26/07 06:25
|
Joined: Mar 2007
Posts: 6
Grand_Wizard
OP
Newbie
|
OP
Newbie
Joined: Mar 2007
Posts: 6
|
How the heck do I add scripts to my objects and resources?
The shortest route is always better, unless the other one is easier
|
|
|
Re: The most sillyest question, but please answer.
[Re: Grand_Wizard]
#126481
04/26/07 08:01
04/26/07 08:01
|
Joined: Mar 2007
Posts: 776 Poor village - Poland ;)
tompo
User
|
User
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
|
1. how to create wdl... just open empty one and save as... in your game directory 2. how to add this new wdl? before main functin in level.wdl write: include <name_of_new_wdl_file.wdl>; 3. if you want to include a new folder with your resources (models, sounds...etc) at the top of main.wdl write: path:"name_of_the_folder"; That's it 
Last edited by tompo; 04/26/07 08:02.
Never say never.
|
|
|
Re: The most sillyest question, but please answer.
[Re: tompo]
#126482
04/26/07 11:43
04/26/07 11:43
|
Joined: Mar 2007
Posts: 6
Grand_Wizard
OP
Newbie
|
OP
Newbie
Joined: Mar 2007
Posts: 6
|
Well i am a total newbie, so i do not understand........
I have a script from sed in my game folder now start wed and add a model....now how do i add that script to this model?
The shortest route is always better, unless the other one is easier
|
|
|
Re: The most sillyest question, but please answer.
[Re: Scorpion]
#126484
04/26/07 12:05
04/26/07 12:05
|
Joined: Mar 2007
Posts: 6
Grand_Wizard
OP
Newbie
|
OP
Newbie
Joined: Mar 2007
Posts: 6
|
I dont get the last part, and thats where the problem is actually, when i go to the behaviour, i dosent show the name of my script, it shows all other prebuilt ones.....So I figured I have to include the script in the game first and then use it. And this is where i ask, HOW?
The shortest route is always better, unless the other one is easier
|
|
|
Re: The most sillyest question, but please answer.
[Re: Grand_Wizard]
#126485
04/26/07 12:19
04/26/07 12:19
|
Joined: Jan 2007
Posts: 1,619 Germany
Scorpion
Serious User
|
Serious User
Joined: Jan 2007
Posts: 1,619
Germany
|
ok..small steps  in your project folder is a *.wdl file wiht the same name as your project. open it! and in the first line u write Code:
include <the_name_of_your_script.wdl>;
save it! now it should work(maybe u have to restart the level-editor)
|
|
|
Re: The most sillyest question, but please answer.
[Re: Grand_Wizard]
#126486
04/26/07 12:20
04/26/07 12:20
|
Joined: Mar 2007
Posts: 776 Poor village - Poland ;)
tompo
User
|
User
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
|
1. Make new script, name it and save in game directory(f.e. test) 2. in tour new and empty script write: Code:
action my_new_behaviour { while(1) { my.pan += 5 * time_step; wait(1); } } Your behaviour must be acttion not function! Then in your main.wdl, over the main function write: Code:
include <test.wdl>: Save all. Now open wed (you have to reopen wed to see new scripts) Place somewhere a model, then right click on the model -> properties -> open behaviour and You should see your new action "my_new_behaviour". Chose it and close properties. Click ok, build and run.
Never say never.
|
|
|
Re: The most sillyest question, but please answer.
[Re: tompo]
#126487
04/26/07 16:07
04/26/07 16:07
|
Joined: Mar 2007
Posts: 6
Grand_Wizard
OP
Newbie
|
OP
Newbie
Joined: Mar 2007
Posts: 6
|
Ohk...so I gotta save the file first, and then open it again?
The shortest route is always better, unless the other one is easier
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|