Initial commit
This commit is contained in:
commit
3b96451047
71 changed files with 2302 additions and 0 deletions
17
addons/walkabout/events/teleport_character_event.gd
Normal file
17
addons/walkabout/events/teleport_character_event.gd
Normal file
|
@ -0,0 +1,17 @@
|
|||
@icon("teleport_character_event.svg")
|
||||
class_name WBTeleportCharacterEvent
|
||||
extends WBEvent
|
||||
## Event that teleports a character to the specified tile position.
|
||||
|
||||
|
||||
## Character to teleport.
|
||||
@export var character: WBCharacter
|
||||
## Tile position to teleport the character to.
|
||||
@export var target_tile: Vector2i
|
||||
|
||||
|
||||
func _perform() -> void:
|
||||
if not character:
|
||||
push_error("Target character does not exist.")
|
||||
return
|
||||
character.global_position = character.tile_center_pos(target_tile)
|
Loading…
Add table
Add a link
Reference in a new issue