Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
win the game!

babis
Registered User
Quote
2017-02-12 12:52:22

Hello to everyone!
I am making a game where the main character must collect, lets say, some "objects". But in order to win the game he must collect them in a certain order. For example first the blue one, then the red one etc...
Is there a way to declare it in the game scenario?


blackwater
Registered User
Quote
2017-02-12 22:30:44

Hey!

It's possible if you work a lot with variables.
In short, you have to define a variable every time somethings happends.

Lets assume you have a player/camera walking around in a terraing and need to press a key in order to get an object on the ground when near it.

So, start with the proximity behaviour:
When player is near blue object, then variable "pick_up_blue"=1. This is a trigger that tells you that it is POSSIBLE to pick it up, otherwise its 0 and not able to be picked up.
And then if the player picks up that blue object by pressing a key, you instruct another variable to be "blue=1", which means that you now have it.

But lets say you need to have the red first:
When key pressed (when the player wants to pick up the blue object), you first check if the varible "red"=1 and if so, variable "blue"=1, if NOT, then variable "pick_up_blue"=0, which makes it impossible to pick up the blue object.

That's a basic version of how to do it. You also need to hide the triggers when the objects are picked up, and also make the triggers "pick-up-x"=0, when the player leaves the vicinity of the object, otherwise you are able to pick them up from miles away. Etc...


babis
Registered User
Quote
2017-02-12 23:09:14

Thank you very much for your answer, i am giving it a try right now!
Just 1 question:
you said "But lets say you need to have the red first:
When key pressed (when the player wants to pick up the blue object), you first check if the varible "red"=1 and if so, variable "blue"=1, if NOT, then variable "pick_up_blue"=0, which makes it impossible to pick up the blue object."
why check if red = 1?? if it is 1 it means tha i have already picked it up.


babis
Registered User
Quote
2017-02-13 00:04:44

Ok blackwater, I got it!!!
thank you again!


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact