Call of Duty 5: World at War => Downloadable Items for Mappers => Custom Maps, Mods & Tools => Scripts => Topic started by: DuaLVII on January 11, 2014, 04:33:00 pm
Title: [User Tutorial] Adding Buildables/Crafting to your map [Update: 1.0.1]
Post by: DuaLVII on January 11, 2014, 04:33:00 pm
Change Log;
Hey Guys,
Just wanted to share this with you all, This is my second ever script for World at War and I hope it will be useful to at least some of you.
Just know that once players have crafted an item in game, there is no function beyond that point and you will have to add your own script to make things happen after an item has been crafted. I placed an example script which works with the main buildable script for you's so you know where to add your own scripts.
Download is located as an attachment at the end of this post.
ok i kind of understand but how does it get turned on when built sry im still learning
If you refer to the example script that comes with the download.
I've placed 2 functions within the example, one for when an item is built, another when item is taken.
In the configuration of the main script `dvii_buildables` you can disable allowing players to take the finished item such that it runs only for a buyable ending.
I'll post more help if needed, But just made this post quickly because I'm about to head of too work.
(Quick edit; on your buyable ending script, if your triggername for the buyable ending is `end_game` then use On example script under dviiBuildFinished() after the flag_wait add;
But like I said, I just rushed this, hope it works, if not, I'll be sure to check in when I get back)
I'll check back later. Thanks, DuaLVII
Title: Re: [Tutorial] Adding Buildables/Crafting to your map
Post by: drugynugy on January 15, 2014, 11:48:04 pm
i have got this working, but now i need to get it to open a door. once ive got all the iteams dvii_buildables sends a flag to dvii_item_built_example so what will i have to put in to it to activate a door plus the kvps for the door in radiant. will i need any code so the door will not work until its ready. sorry for being a noob but gotta start somewhere. thanks and respect will be given for all help
Title: Re: [Tutorial] Adding Buildables/Crafting to your map
Post by: DuaLVII on January 16, 2014, 05:48:54 am
i have got this working, but now i need to get it to open a door. once ive got all the iteams dvii_buildables sends a flag to dvii_item_built_example so what will i have to put in to it to activate a door plus the kvps for the door in radiant. will i need any code so the door will not work until its ready. sorry for being a noob but gotta start somewhere. thanks and respect will be given for all help
AHA! Drugynugy, My star, your the first to say `This works` and most importantly didn't say `I got an error` I'll write up something in a bit, I didn't sleep so well last night so I'll be back in a few hours. Post Merge: January 16, 2014, 11:22:28 amOk, Try this (Note I haven't tested this, but I hope it works for you)
This is what I've got so far which doesn't disconnect paths and enable a new zone (Depends on where this door will lead too though)
Make a door with script_brushmodel; kvp's; (May want to modify the script_vector depending on door direction for opening)
Once build is finished
When item is taken
Title: Re: [Tutorial] Adding Buildables/Crafting to your map
Post by: drugynugy on January 16, 2014, 05:05:57 pm
one respect coming your way. works perfect. your a supper star thanks drugynugy
Title: Re: [Tutorial] Adding Buildables/Crafting to your map
Post by: DuaLVII on January 16, 2014, 05:50:49 pm
AHA! Drugynugy, My star, your the first to say `This works` and most importantly didn't say `I got an error` I'll write up something in a bit, I didn't sleep so well last night so I'll be back in a few hours. Post Merge: January 16, 2014, 11:22:28 amOk, Try this (Note I haven't tested this, but I hope it works for you)
This is what I've got so far which doesn't disconnect paths and enable a new zone (Depends on where this door will lead too though)
Make a door with script_brushmodel; kvp's; (May want to modify the script_vector depending on door direction for opening)
Once build is finished
When item is taken
what do u mean //iPrintLn("Continue function from here"); //From here add your work to give your item a function once built
im getting a bad syntax error it says }, would this be whats wrong?
Title: Re: [User Tutorial] Adding Buildables/Crafting to your map [Update: 1.0.1]
Post by: DuaLVII on April 25, 2014, 06:39:45 am
PM Me your example script.
Title: Re: [User Tutorial] Adding Buildables/Crafting to your map [Update: 1.0.1]
Post by: BishyFTW on April 26, 2014, 06:54:20 pm