Collectible Item Scripting Help

Post Reply
WastedTimeYT
Posts: 6
Joined: Fri Sep 30, 2016 6:48 pm

Collectible Item Scripting Help

Post by WastedTimeYT » Mon Feb 27, 2017 12:24 am

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?

User avatar
Silverfish
Posts: 1451
Joined: Sun Oct 26, 2008 8:24 pm
Location: Sweden
Contact:

Re: Collectible Item Scripting Help

Post by Silverfish » Mon Feb 27, 2017 6:14 am

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.
  1. Go to Edit->Set level script and select the challengelevel script.
  2. Save the level and load it again to make the script active.
  3. Go to Load->Hotspot->Collectible Target and place it where you want the player to have to bring the items to complete the level.
  4. 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.
  5. 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.
  6. Press Windows->Scenegraph, expand Level->Script Params and set "Objectives" to "collect" without the quotes.
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.
Attachments
OvergrowthScreenshot00001.jpg

WastedTimeYT
Posts: 6
Joined: Fri Sep 30, 2016 6:48 pm

Re: Collectible Item Scripting Help

Post by WastedTimeYT » Tue Feb 28, 2017 11:44 pm

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.
  1. Go to Edit->Set level script and select the challengelevel script.
  2. Save the level and load it again to make the script active.
  3. Go to Load->Hotspot->Collectible Target and place it where you want the player to have to bring the items to complete the level.
  4. 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.
  5. 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.
  6. Press Windows->Scenegraph, expand Level->Script Params and set "Objectives" to "collect" without the quotes.
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.
Thanks for the help! I got it working.

Post Reply