Fandom

BattleForge Wiki

Action Script Example - Playing a Card

1,156pages on
this wiki
Add New Page
Talk0 Share
Description
The following script will play out a card as if a player had played it.
Note: It will not cost the player any power.
Note: See Script Information - Card IDs for the IDs.
Code
State {
   StateName = "INIT",
   OnOneTimeEvent {
      Conditions = {},
      Actions = {
         PlayerCardSquadFakePlay {
            Player = "pl_Player1",
            CardSquadId = 287,
            TargetTag = "startpoint",
            Direction= 180
         }
         PlayerCardSquadFakePlayWithTag {
            Tag = "card1",
            Player = "pl_Player1",
            CardSquadId = 287,
            TargetTag = "startpoint",
            Direction= 180
         }
      }
   }
}
Notes
  • Tag is the tag given to the squad upon spawn. Spawning multiple squads with the same tag will cause an assertion failure.
  • TargetTag is the destination at which the squad will spawn, it can be any entity.
  • Player is the owner of the spawned squad.
  • CardSquadId is the Database ID for the card. You can find a list at Script Information - Card IDs.
  • You may use any tag names you wish.
  • You can add any Script Event Condition in the condition section to force this script to only trigger when the condition is true.


.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.