Making a fire by collecting wood

By LadylexUK

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

  1. WHEN [once] DO [global][objset:trees][increment by][me]
  2. WHEN [in air] DO [destroy] // this stops trees appearing over the water
  3. WHEN [hit by attack] DO [numvar:hits][increment by][1]
  4. …WHEN DO [pitch]
  5. …WHEN DO [objvar:target][equals][it]
  6. WHEN [numvar: hits][greater than or equal to][3]
  7. …WHEN DO [objvar:target][numvar:wood][increment by][1]
  8. …WHEN DO [play fx][fx:Plant debris][on][me]
  9. …WHEN DO [destroy][me]

Step Two:  In your base camp put a fire pit or a camp fire. In its brain

  1. WHEN [detect][player]
  2. …WHEN [it][numvar:wood][greater than or equal to][1] // change to how many you want him to collect
  3. …/…WHEN [interacted] DO [power on]
  4. …/…/…WHEN DO [it][numvar:wood][decrement by][1]
  5. …/…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

  1. WHEN DO [vectorvar:tree][equals][position][plus][random vector][circle][inside][radius][50]
  2. WHEN [global][objset:trees][count][less than][5] // however many wood collecting trees you want at any one time
  3. …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.

Comments are closed.

Powered by

Up ↑

%d bloggers like this: