- Joined
- Jun 17, 2012
- Messages
- 46
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Bump 1

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


Set loc = (Position of bumpUnit)


Custom script: set bj_wantDestroyGroup = true


Unit Group - Pick every unit in (Units in (Region centered at loc with size (bumpCollisionSize, bumpCollisionSize)) matching ((Matching unit) Not equal to bumpUnit)) and do (Actions)



Loop - Actions




Set loc2 = (Position of (Picked unit))




Set loc3 = (loc2 offset by bumpExtraDistance towards (Angle from loc to loc2) degrees)




Set x = (X of loc3)




Set y = (Y of loc3)




Set u = (Picked unit)




Custom script: call SetUnitX(udg_u, udg_x)




Custom script: call SetUnitY(udg_u, udg_y)




Unit - Cause bumpUnit to damage u, dealing 10.00 damage of attack type Spells and damage type Normal




Custom script: call RemoveLocation(udg_loc2)




Custom script: call RemoveLocation(udg_loc3)


Custom script: call RemoveLocation(udg_loc)
Bump Settings

Events


Map initialization

Conditions

Actions


Set bumpExtraDistance = 32.00


Set bumpCollisionSize = 200.00


Set bumpUnit = Rifleman 0001 <gen>
EDIT3: It works decently well, except the person shoves the block, instead of the other way around. Also would there be a way for the shove to go more smoothly, instead of the villager just getting teleported a certain distance away?
I thought about that but I don't think there's a way to make an event that says when a unit comes within __ of unit.
Events

Unit - A unit comes within 100.00 of other unit
Custom script: set Other_Unit = FirstOfGroup(udg_UnitGroup)