Add initial standard library, and port shellmaps.
This commit is contained in:
@@ -520,10 +520,10 @@ Actors:
|
||||
Location: 11,52
|
||||
Owner: Neutral
|
||||
GDIReinforcementsEntry: waypoint
|
||||
Location: 7, 50
|
||||
Location: 7,50
|
||||
Owner: Neutral
|
||||
Auto1Trigger: waypoint
|
||||
Location: 52, 47
|
||||
Location: 52,47
|
||||
Owner: Neutral
|
||||
NodHeliEntry: waypoint
|
||||
Location: 41,23
|
||||
@@ -561,6 +561,7 @@ Rules:
|
||||
-GiveCashCrateAction:
|
||||
-ExplodeCrateAction@fire:
|
||||
-CloakCrateAction:
|
||||
ScriptTriggers:
|
||||
|
||||
Sequences:
|
||||
|
||||
|
||||
@@ -993,8 +993,8 @@ Rules:
|
||||
PlayMusicOnMapLoad:
|
||||
Music: map1
|
||||
Loop: true
|
||||
LuaScriptInterface:
|
||||
LuaScripts: shellmap.lua
|
||||
LuaScript:
|
||||
Scripts: shellmap.lua
|
||||
LoadWidgetAtGameStart:
|
||||
Widget: MENU_BACKGROUND
|
||||
LST:
|
||||
|
||||
@@ -5,15 +5,14 @@ speed = 5
|
||||
Tick = function()
|
||||
ticks = ticks + 1
|
||||
local t = (ticks + 45) % (360 * speed) * (math.pi / 180) / speed;
|
||||
OpenRA.SetViewportCenterPosition(WPos.op_Addition(viewportOrigin, WVec.New(-15360 * math.sin(t), 4096 * math.cos(t))))
|
||||
Camera.Position = viewportOrigin + WVec.New(-15360 * math.sin(t), 4096 * math.cos(t), 0)
|
||||
end
|
||||
|
||||
WorldLoaded = function()
|
||||
viewportOrigin = OpenRA.GetViewportCenterPosition()
|
||||
CreateUnitsInTransport(lst1, { "htnk" });
|
||||
CreateUnitsInTransport(lst2, { "mcv" });
|
||||
CreateUnitsInTransport(lst3, { "htnk" });
|
||||
|
||||
viewportOrigin = Camera.Position
|
||||
LoadTransport(lst1, "htnk")
|
||||
LoadTransport(lst2, "mcv")
|
||||
LoadTransport(lst3, "htnk")
|
||||
local units = { boat1, boat2, boat3, boat4, lst1, lst2, lst3}
|
||||
for i, unit in ipairs(units) do
|
||||
LoopTrack(unit, CPos.New(8, unit.Location.Y), CPos.New(87, unit.Location.Y))
|
||||
@@ -21,17 +20,11 @@ WorldLoaded = function()
|
||||
end
|
||||
|
||||
LoopTrack = function(actor, left, right)
|
||||
Actor.ScriptedMove(actor, left)
|
||||
Actor.Teleport(actor, right)
|
||||
Actor.CallFunc(actor, function() LoopTrack(actor, left, right) end)
|
||||
actor.ScriptedMove(left)
|
||||
actor.Teleport(right)
|
||||
actor.CallFunc(function() LoopTrack(actor, left, right) end)
|
||||
end
|
||||
|
||||
CreateUnitsInTransport = function(transport, passengerNames)
|
||||
local cargo = Actor.Trait(transport, "Cargo")
|
||||
local owner = Actor.Owner(transport)
|
||||
local facing = Actor.Facing(transport)
|
||||
|
||||
for i, passengerName in ipairs(passengerNames) do
|
||||
cargo:Load(transport, Actor.Create(passengerName, { AddToWorld = false, Owner = owner, Facing = { facing, "Int32" } }))
|
||||
end
|
||||
LoadTransport = function(transport, passenger)
|
||||
transport.LoadPassenger(Actor.Create(passenger, false, { Owner = transport.Owner, Facing = transport.Facing }))
|
||||
end
|
||||
@@ -42,6 +42,7 @@
|
||||
UncloakSound: trans1.aud
|
||||
Huntable:
|
||||
LuaScriptEvents:
|
||||
ScriptTriggers:
|
||||
|
||||
^Tank:
|
||||
AppearsOnRadar:
|
||||
@@ -90,6 +91,7 @@
|
||||
UncloakSound: trans1.aud
|
||||
Huntable:
|
||||
LuaScriptEvents:
|
||||
ScriptTriggers:
|
||||
|
||||
^Helicopter:
|
||||
AppearsOnRadar:
|
||||
@@ -122,6 +124,7 @@
|
||||
UpdatesPlayerStatistics:
|
||||
Huntable:
|
||||
LuaScriptEvents:
|
||||
ScriptTriggers:
|
||||
|
||||
^Infantry:
|
||||
AppearsOnRadar:
|
||||
@@ -183,6 +186,7 @@
|
||||
LuaScriptEvents:
|
||||
DetectCloaked:
|
||||
Range: 1
|
||||
ScriptTriggers:
|
||||
|
||||
^CivInfantry:
|
||||
Inherits: ^Infantry
|
||||
@@ -261,6 +265,7 @@
|
||||
UpdatesPlayerStatistics:
|
||||
Huntable:
|
||||
LuaScriptEvents:
|
||||
ScriptTriggers:
|
||||
|
||||
^Plane:
|
||||
AppearsOnRadar:
|
||||
@@ -280,6 +285,7 @@
|
||||
Huntable:
|
||||
AttackMove:
|
||||
LuaScriptEvents:
|
||||
ScriptTriggers:
|
||||
|
||||
^Ship:
|
||||
AppearsOnRadar:
|
||||
@@ -305,6 +311,7 @@
|
||||
UpdatesPlayerStatistics:
|
||||
Huntable:
|
||||
LuaScriptEvents:
|
||||
ScriptTriggers:
|
||||
|
||||
^Building:
|
||||
AppearsOnRadar:
|
||||
@@ -348,6 +355,7 @@
|
||||
Huntable:
|
||||
LuaScriptEvents:
|
||||
Demolishable:
|
||||
ScriptTriggers:
|
||||
|
||||
^BaseBuilding:
|
||||
Inherits: ^Building
|
||||
@@ -389,6 +397,7 @@
|
||||
FrozenUnderFog:
|
||||
StartsRevealed: true
|
||||
LuaScriptEvents:
|
||||
ScriptTriggers:
|
||||
|
||||
^TechBuilding:
|
||||
Inherits: ^CivBuilding
|
||||
@@ -429,6 +438,7 @@
|
||||
FrozenUnderFog:
|
||||
StartsRevealed: true
|
||||
LuaScriptEvents:
|
||||
ScriptTriggers:
|
||||
|
||||
^Wall:
|
||||
AppearsOnRadar:
|
||||
@@ -460,6 +470,7 @@
|
||||
BodyOrientation:
|
||||
FrozenUnderFog:
|
||||
LuaScriptEvents:
|
||||
ScriptTriggers:
|
||||
|
||||
^Tree:
|
||||
Tooltip:
|
||||
@@ -484,6 +495,7 @@
|
||||
FrozenUnderFog:
|
||||
StartsRevealed: true
|
||||
LuaScriptEvents:
|
||||
ScriptTriggers:
|
||||
|
||||
^TibTree:
|
||||
Tooltip:
|
||||
@@ -520,6 +532,7 @@
|
||||
FrozenUnderFog:
|
||||
StartsRevealed: true
|
||||
LuaScriptEvents:
|
||||
ScriptTriggers:
|
||||
|
||||
^Husk:
|
||||
Health:
|
||||
@@ -545,6 +558,7 @@
|
||||
BodyOrientation:
|
||||
LuaScriptEvents:
|
||||
DisabledOverlay:
|
||||
ScriptTriggers:
|
||||
|
||||
^HelicopterHusk:
|
||||
Inherits: ^Husk
|
||||
@@ -573,4 +587,5 @@
|
||||
DestroyedSound: xplobig4.aud
|
||||
BodyOrientation:
|
||||
LuaScriptEvents:
|
||||
ScriptTriggers:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user