Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Stealth in CopperCube?

josefumo
Registered User
Quote
2022-08-02 20:07:03

I am interested if there is possibility to make stealth in CopperCube.
It can be pretty simple, not some super fancy stuff.
Like hide behind objects so enemy can't see you.
Is it possible?


Guest
Guest
Quote
2022-08-02 20:19:47

Yeah it's totally possible. I'd use JS to do it, but you can probably make a decent stealth system with just the default stuff and variables. Perhaps use the On Proximity behavior to make "stealth zones" aka dark areas like alcoves or behind stacks of crates.


josefumo
Registered User
Quote
2022-08-02 21:31:18

Thank you!
Thats great idea, gonna try it.


Arcanjo
Guest
Quote
2022-08-04 17:19:50

JoseFumo GO... but we came back.


Robo
Guest
Quote
2022-08-05 16:45:09

josefumo wrote:
Like hide behind objects so enemy can't see you.
Is it possible?


Yes, as mentioned use javascript to check when an enemy is activated or within distance to player to do something, then make the enemy face the player and then run "ccbGetCollisionPointOfWorldWithLine(startX, startY, startZ, endX, endY, endZ)" to get view collisions.

With this collision location see if that line from the enemy to this collision point intersects the player bounding box using "ccbDoesLineCollideWithBoundingBoxOfSceneNode(node, startX, startY, startZ, endX, endY, endZ)" to see if they player is in view of the enemy and adjust accordingly..


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internatio?al" (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