Skip to content

Commit eefd917

Browse files
author
Roberto De Ioris
committed
2 parents 81598f1 + 49c4347 commit eefd917

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/editor_scripting001.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66

77
world = ue.get_editor_world()
88

9+
# instantiate 10 pawns with projectile component
910
for i in range(0, 10):
1011
new_pawn = world.actor_spawn(Pawn, FVector(0, 0, i * 1000))
1112
new_pawn.set_actor_label("FooBarPawn {0}".format(i))
1213
projectile = new_pawn.add_actor_component(ProjectileMovementComponent, 'Projectile Movement')
1314
projectile.InitialSpeed = 173.0
1415
projectile.MaxSpeed = 999.9
1516

17+
# instantiate 10 characters with sensing component
1618
for i in range(0, 10):
1719
new_character = world.actor_spawn(Character, FVector(i * 100, 0, i * 1000))
1820
new_character.set_actor_label("FooBarCharacter {0}".format(i))
@@ -40,10 +42,12 @@
4042

4143
ue.compile_blueprint(bp)
4244

45+
# instantiate a new actor using the previously created blueprint
4346
super_evil_pawn = world.actor_spawn(bp.GeneratedClass)
4447
super_evil_pawn.set_actor_label('Super Evil Pawn')
4548
super_evil_pawn.SightPower = 2217.30
4649

50+
# save them all
4751
ue.editor_save_all()
4852

4953

0 commit comments

Comments
 (0)