Page 2 of 7

Re: Possible game idea and question

Posted: March 26th, 2010, 2:38 pm
by Venima
Well, if this will be in RPG mode then just simply have an item in the inventory called "ore" with a heavy weight. (assuming not being able to carry more than your maximum weight is implemented)

But yeah umm..

Code: Select all

mine1_ore = 1000

level_trigger_1 = [
   if (> $mine1_ore 0) [
      mine1_ore = (- $mine1_ore 10)
      echo "You have collected some ore!"
      r_additem iron_ore //I think this is the sort of code you write anyway, not so practiced with rpg mode coding
   ] [
      echo "The mine here is completely depleted of resources."
      echo "You won't find any ore here."
   ]
]


"level_trigger_1" being the mine. If you would rather the mine as a spawned object that's fine. Just replace "level_trigger_1" with "r_interact" and put that into the spawn code for the mine.

Re: Possible game idea and question

Posted: March 26th, 2010, 3:00 pm
by Leo_V117
So, would this work the same with money?

Re: Possible game idea and question

Posted: March 26th, 2010, 3:57 pm
by Venima
I would imagine it would work with whatever you like.

Re: Possible game idea and question

Posted: March 26th, 2010, 3:59 pm
by Leo_V117
data chips or key cards that open certain doors.

Re: Possible game idea and question

Posted: March 26th, 2010, 4:19 pm
by Venima
easy stuff

Re: Possible game idea and question

Posted: March 26th, 2010, 4:37 pm
by Leo_V117
Go on then, Create a code for a door that requires 4 chips to open.

Re: Possible game idea and question

Posted: March 26th, 2010, 4:52 pm
by Venima
triggers 1 to 4 should be assigned to keycard models with trigger type 12.

trigger 5 should be assigned to a door model with trigger type 11.

Code: Select all

chip1 = 0
chip2 = 0
chip3 = 0
chip4 = 0
trigger 5 0

level_trigger_1 = [ //chip 1
   chip1 = 1
   echo "You have found chip 1"
]
level_trigger_2 = [ //chip 2
   chip2 = 1
   echo "You have found chip 2"
]
level_trigger_3 = [ //chip 3
   chip3 = 1
   echo "You have found chip 3"
]
level_trigger_4 = [ //chip 4
   chip4 = 1
   echo "You have found chip 4"
]

level_trigger_5 = [ //the door
   if (= $chip1 1) [if (= $chip2 1) [if (= $chip3 1) [if (= $chip4 1)
               trigger 5 1
   ] [] ] [] ] [] ] []
]

Re: Possible game idea and question

Posted: March 26th, 2010, 4:54 pm
by Venima
alternatively, if all the chips are the same:

assign all the chips to trigger 1, and the door to trigger 2.

Code: Select all

chipno = 0

level_trigger_1 = [ //chip
   chipno = (+ $chipno 1)
   echo "You have found a chip"
]

level_trigger_2 = [ //the door
   if (= $chipno 4) [
               trigger 2 1
   ] []
]

Re: Possible game idea and question

Posted: March 26th, 2010, 8:50 pm
by Leo_V117
Youre good. How about this one then. Theres a Mansion. with 4 floors. Groundfloor, First Floor, Second Floor and Basement. The ground floor has 12 doors. 8 of them need keys. 2 Red, 3 Blue, 1 Green, and 2 Yellow. 4 Do not need keys.
The First Floor has 14 Doors. 9 Need Keys. 3 Red, 4 Blue, 1 Green, and 1 Yellow. 5 Do not need keys.
The second floor has 10 doors. All of them need keys. 2 red, 3 blue, 3 green, and 2 Yellow.
The basement uses the key card system.

There are 4 Types of keys. Red, Blue, Green, and Yellow.
There are 5 types of key cards. Red, Blue, Green, Yellow, and Master.

The master Key card opens any door. The coloured cards open the set doors.

Figure that one out.

Re: Possible game idea and question

Posted: March 26th, 2010, 9:11 pm
by GR1M
Gosh I've been here so long i should start really getting into scripting. But i hate it so much :(