Hi guys.
calling for help here. been trying to crate an automatic transport entity in the last map im creating.
i´ve been reading all the scar tutorials, trying to create my own lines of code to make that possible, but im afraid im too noob for that, and learning by my own is slow. so i was hoping for some tips about how can i do it.
this is the idea.
the transport idea is based on a thunderhawk entity. main thing is that any troop that comes near it is ported to a certain location of the map. only the player owner of the transport can use it.
so the scar lines im looking for are 2:
1. if any player squad goes near the thunderhawk, that squad is ported to a certain coordinates of the map.
2. trigger an animation of take off in the thunderhawk entity. (was wondering if i have to create that animation in ME or i can trigger an allready existing animation.
for the moment, im fighting the lines "Player_AreSquadsNearMarker", but i dont know if im in the wrong way.
and about the animation "Anim_PlayEntityAnim"
but for the spawning squads im completly lost, was thinking about using the "Squad_Spawn" but then again, i dont have a clue about the logic of the spawn-despawn.
thanks in advance for the help
this is as far as i go:
import("ScarUtil.scar")
import("WXPScarUtil.scar")
import("WCUtil.scar")
function OnInit()
g_Player1 = World_GetPlayerAt(0)
Rule_Add(Rule_Teleport1)
Rule_AddOneShot(Rule_Animation1, 2)
end
Scar_AddInit(OnInit)
function Rule_Teleport1()
Player_GetAllSquadsNearMarker(g_Player1,"TelSquad1"..World_GetGameTime() ,"Tel_Entrance1")
SGroup_DeSpawn("TelSquad1"..World_GetGameTime() )
SGroup_ReSpawnMarker("TelSquad1"..World_GetGameTime() ,"Tel_Exit1")
end
function Rule_Animation1()
if Prox_AllSquadsNearMarker("TelSquad1"..World_GetGameTime() ,"Tel_Entrance1") == true then
Anim_PlaySquadAnim(thunderhawk ,"ThunderHawk")
end
end
notice this is for player 1. it teleports the units, but doesnt trigger any animation.
i have to make another variable, that the rules are canceled if the thunderhawks are destroyed.



you can chech it here, in the maproom, is Tarsis Ultra Complete. Dimand and Dark40k solved the puzzle ^^
