≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
From Patrol to Attack - CCB Template
Posted by:
(you are not logged in)
Enter the missing letter in: "Internati?nal"
(you are not logged in)
Text:
[quote][b]srfstudio[/b] wrote: While I was working on my project I realized that I needed a simple behavior with patrol & attack action. Guards are patrolling and then, if player does something wrong, they start attacking. As @tim12345 suggested I've made a new version that uses Behavior & Action file: [url]https://www.newgrounds.com/dump/download/6a3a25ec5c84264fdcead232f2080c06[/url] For this behavior to work you need: 1. Path with transparent object moving down that path (in a loop). 2. Enemy object with 'Game Actor with Health', 'On Proximity Do Something', this behavior (Enemy Patrol And Attack - Behavior) and accompanying action (Enemy Patrol And Attack - Action). Action should be placed in 'On Proximity Do Something'. What does this behavior do: 1. Soldier will be patrolling (following the object that’s moving down the path) until player is within the proximity of Soldier 'On Proximity' behavior. 2. Once player reaches the required distance to the soldier (in this example soldier 'On Proximity' distance is more or less similar to the blue floor-box) soldier will start shooting at player (start acting according to your settings in 'Game Actor with Health' behavior). This behavior and action are working with multiple enemies, you can even use Clone option. Only thing is that you should change 'Path/Object they follow if you want them to have different patrol-routes. Activation Radius of 'Game Actor with Health' is still relevant so it should be similar to 'On Proximity' Distance. Also with this behavior enemy can actually follow anything: another soldier, any object that moves, maybe even player... I’m no coder so if anyone feels he can upgrade/change this to a more functional behavior/action I would be very grateful if he would post his modifications here :) I will work further on this since I don't really like native 'Game Actor with Health' behavior, the CC default attack movements are very strange. They make enemy seem uninterested in shooting or, with my modifications in this ccb, shoot like a mad-lad :)[/quote]
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