Collectible Item Scripting Help
-
- Posts: 6
- Joined: Fri Sep 30, 2016 6:48 pm
Collectible Item Scripting Help
I'm making a map and the objective is to collect 10 rat sacks ,but I don't understand how to define which object the hotspot looks for. It is set for 10 items ,but I don't know how to change the actual script. Any help?
-
- Posts: 1451
- Joined: Sun Oct 26, 2008 8:24 pm
- Location: Sweden
- Contact:
Re: Collectible Item Scripting Help
I'm including all steps needed so anyone else who finds this can get it to work too. Just skip any steps you've already completed.
- Go to Edit->Set level script and select the challengelevel script.
- Save the level and load it again to make the script active.
- Go to Load->Hotspot->Collectible Target and place it where you want the player to have to bring the items to complete the level.
- Select the newly placed hotspot and press U, expand Hotspot->Script Params and set "Collectables needed" to the number of collectibles you want the player to have to gather to complete the level. There is no way to choose what specific objects will contribute towards the goal.
- Place Load->Interactive Objects->Rat junk sack or any other non-weapon object from this list you want the player to be able to collect.
- Press Windows->Scenegraph, expand Level->Script Params and set "Objectives" to "collect" without the quotes.
-
- Posts: 6
- Joined: Fri Sep 30, 2016 6:48 pm
Re: Collectible Item Scripting Help
Thanks for the help! I got it working.Silverfish wrote:I'm including all steps needed so anyone else who finds this can get it to work too. Just skip any steps you've already completed.
Now, press L to restart the level, pick up the objects and place them in the collectible target hotspot. Once the number of items in the hotspot is equal to or grater than the "collectables needed" parameter on the collectible target hotspot, you should get a level end screen.
- Go to Edit->Set level script and select the challengelevel script.
- Save the level and load it again to make the script active.
- Go to Load->Hotspot->Collectible Target and place it where you want the player to have to bring the items to complete the level.
- Select the newly placed hotspot and press U, expand Hotspot->Script Params and set "Collectables needed" to the number of collectibles you want the player to have to gather to complete the level. There is no way to choose what specific objects will contribute towards the goal.
- Place Load->Interactive Objects->Rat junk sack or any other non-weapon object from this list you want the player to be able to collect.
- Press Windows->Scenegraph, expand Level->Script Params and set "Objectives" to "collect" without the quotes.