Super Power – Destroy

Type: Additional skill
Level: 2 star
Pages: 1
Description: An instant kill ability. Player emotes and explodes the nearest object  when they press Y- this can be enemy or prop.

Issues: Not compatible with a player brain that uses the Y for shooting as it cannot run both animations at the same time.Can destroy your scenery which may not be ideal.  Will destroy nearest object, which may be quite a distance from the player and spoils the effect. See Alterations.

Can be added to a player brain by copy and paste, on a call page or by using multibrain add brain.

Kode

  1. WHEN [button:Y][pressed] DO [emote][mad]
  2. …WHEN DO [turn][toward][nearest object]
  3. …WHEN DO [play fx][Fire explosion][at position][nearest object]
  4. …/…WHEN [play sound][Explosion Fiery]
  5. …/…WHEN [kill][nearest object]

Alterations

For brains with shoot mechanics alter line 1 to a different control button (right bumper for example).

Only kill enemies
To stop player from destroying scenery with this ability add line above line 2 as a child line to line 1
WHEN [enemies][nearest object] DO [objvar:target][equals][it]
replace all instances of [nearest object] to [objvar:target]

To stop player destroying enemies too far away
Use a trigger zone on your player so he can only kill enemies inside the box. Change to

  1. WHEN [button:Y][pressed]
  2. …WHEN [enemies][nearest object] DO [objvar:target][equals][it]
  3. …WHEN [in trigger zone][objvar:target]
  4. …/…WHEN DO [emote][mad]
  5. …/…WHEN DO [turn][toward][objvar:target]
  6. …/…WHEN DO [play fx][Fire explosion][at position][objvar:target]
  7. …/…/…WHEN [play sound][Explosion Fiery]
  8. …/…/…WHEN [kill][objvar:target]

Comments are closed.

Website Powered by WordPress.com.

Up ↑

%d bloggers like this: