Here is the scenario. You have arrived at your base camp. Before you can use it to upgrade your skills and weapons you have to light a fire. You need to collect wood from the forest to do this. Here is how you could do that.
Step One: Make some trees that are distinct from the landscape trees so your player knows they are wood collecting objects. I have used the Woodland Snag. Make it a template. In its brain
- WHEN [once] DO [global][objset:trees][increment by][me]
- WHEN [in air] DO [destroy] // this stops trees appearing over the water
- WHEN [hit by attack] DO [numvar:hits][increment by]
- …WHEN DO [pitch]
- …WHEN DO [objvar:target][equals][it]
- WHEN [numvar: hits][greater than or equal to]
- …WHEN DO [objvar:target][numvar:wood][increment by]
- …WHEN DO [play fx][fx:Plant debris][on][me]
- …WHEN DO [destroy][me]
Step Two: In your base camp put a fire pit or a camp fire. In its brain
- WHEN [detect][player]
- …WHEN [it][numvar:wood][greater than or equal to] // change to how many you want him to collect
- …/…WHEN [interacted] DO [power on]
- …/…/…WHEN DO [it][numvar:wood][decrement by]
- …/…WHEN [else] DO [say][text:You need more wood]
Step Three: Place your wood. Now you could do this manually, but it might be better to have a more random selection of trees, and more trees to collect as required.
Create a logic cube. Name it Tree spawner. In its brain
- WHEN DO [vectorvar:tree][equals][position][plus][random vector][circle][inside][radius]
- WHEN [global][objset:trees][count][less than] // however many wood collecting trees you want at any one time
- …WHEN DO [create][IWP:Woodland snag][at position][vectorvar:tree]
Now you can continue with your base camp creation. Maybe you need to collect other objects as well as wood to make a shelter. Once both of these are made you can activate the base camp functionality for upgrades.