Login

russian armor

Unit Spawn in SCAR

3 Jan 2015, 00:17 AM
#1
avatar of Thurga

Posts: 5

hello,

i wanna spawn units on my map.

please check my scar file for errors.

thank you very much...

Code

import("ScarUtil.scar")

function OnInit()

-- [[ Markers ]]

-- [[ Squad Groups ]]

-- [[ Entity Groups ]]

Rule_AddInterval(Spawn_Pak88, 100)

end

Scar_AddInit(OnInit)

function Spawn_Pak88()

--create squad group
sg_ax_spawn_pak88_1 = SGroup_CreateIfNotFound("ax_spawn_pak88_1")

player1 = World_GetPlayerAt(1)

--our blueprint
bp_pak88_squad = Util_GetSquadBlueprintID("sbps/races/german/vehicles/at_gun_squad/pak43_88mm_at_gun_squad_mp.lua")

--now spawn the stuff
Util_CreateSquadsAtMarker(player1, sg_AX_Spawn_Pak88_1, spawn_pak88, mkr_AX_Spawn_Pak88_1, 1)

end
3 Jan 2015, 10:31 AM
#2
avatar of Thurga

Posts: 5

Would you please be so kind and Check my scar file? The Script doesn't work and i don't now, where the problem is located.

Is it correct, to set a waypoint in World Bilder called "scar waypoint/Player spawn/waypointname?

Many thanks for your help. I' am a bit confused about that.
3 Jan 2015, 10:41 AM
#3
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 11

Replace
Code

--our blueprint
bp_pak88_squad = Util_GetSquadBlueprintID("sbps/races/german/vehicles/at_gun_squad/pak43_88mm_at_gun_squad_mp.lua")

--now spawn the stuff
Util_CreateSquadsAtMarker(player1, sg_AX_Spawn_Pak88_1, spawn_pak88, mkr_AX_Spawn_Pak88_1, 1)


With
Code
--our blueprint
local bp_pak88_squad = BP_GetSquadBlueprint("pak43_88mm_at_gun_squad_mp")
--now spawn the stuff
Util_CreateSquads(player1, sg_AX_Spawn_Pak88_1, bp_pak88_squad, mkr_AX_Spawn_Pak88_1)


Errors:
  • Util_GetSquadBlueprintID Doesn't exist
  • Util_CreateSquadsAtMarker Doesn't exist
3 Jan 2015, 11:19 AM
#4
avatar of Thurga

Posts: 5

Many und thanks!
3 Jan 2015, 14:24 PM
#5
avatar of Thurga

Posts: 5

Ok another question
I don't wanna spawn Intervall Units. The Unit should be spawn at ONCE.

Rule_Add???

Many thanks ...
3 Jan 2015, 15:07 PM
#6
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 11

Rule_AddOneShot(Spawn_Pak88, 100)
7 Jan 2015, 19:43 PM
#7
avatar of Thurga

Posts: 5

question regarding starting buildings:

I don´t want to have starting buildings. Exclusive starting units.

how can i made this in coh2? is it possible? I changed the "starting_position_shared_territory" in my mod (via coh2 tools/ attrib file), but it doesn´t have an effect!!!
5 Jun 2015, 22:22 PM
#8
avatar of Viper86ed

Posts: 13

Is this the method i should use in .scar , if say i wanted to spawn all of mine and the enemies artillery with a crew operating it? I saw artillery pieces in POA Operation Schwanberg 4v4 v2 and have been wondering how in the world he did it.
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

588 users are online: 588 guests
0 post in the last 24h
5 posts in the last week
33 posts in the last month
Registered members: 49177
Welcome our newest member, michwishu56
Most online: 2043 users on 29 Oct 2023, 01:04 AM