Scar; Adding call-in units to an sgroup
7 Apr 2018, 22:49 PM
#1


Posts: 327
Simple question, so simple you can probably guess it from the title. Is there a simple way of adding call-in units to an sgroup? For example, the player starts out with units, and unlocks more units by command points. When this unit is requisitioned/created, how would you go about adding it to an existing sgroup (ex: sg_player_all)?
10 Apr 2018, 02:38 AM
#2


Posts: 756 | Subs: 8
Unfortunately, your options are somewhat limited due to Relic not fully implementing quite a few game events (such as GE_SquadCalledIn).
However, there are a couple of ways you could go about it:
First is to use a timed rule with a short interval that updates the sgroup with all of the player's current squads. This is the costly option, but probably least amount of effort.
Otherwise, you could try GE_BuildItemComplete, which would give you the blueprint of the built squad. You would probably need to store all of a player's squads in one sgroup. Then, when the event is fired, store all the player's squads at the time of the event and get the difference - that should give you the produced squad.
Either way, it's messy.
However, there are a couple of ways you could go about it:
First is to use a timed rule with a short interval that updates the sgroup with all of the player's current squads. This is the costly option, but probably least amount of effort.
Otherwise, you could try GE_BuildItemComplete, which would give you the blueprint of the built squad. You would probably need to store all of a player's squads in one sgroup. Then, when the event is fired, store all the player's squads at the time of the event and get the difference - that should give you the produced squad.
Either way, it's messy.
10 Apr 2018, 20:56 PM
#3


Posts: 327
It seems I completely forgot about the attrib side of things being quite useful.
I think I might have figured out a less costly solution for this single mission. It relies nearly completely on custom units and attribs tuned for it, thus I can make it so the custom call-in abilities trigger a script that updates the player(s) units.
Edit: Well that works quite good actually. Its good to know attribute entries can also activate map-specific scripts.
I think I might have figured out a less costly solution for this single mission. It relies nearly completely on custom units and attribs tuned for it, thus I can make it so the custom call-in abilities trigger a script that updates the player(s) units.
Edit: Well that works quite good actually. Its good to know attribute entries can also activate map-specific scripts.
PAGES (1)

1 user is browsing this thread:
1 guest
Livestreams
![]() |
![]() |
![]() |
19 | ||
![]() |
![]() |
![]() |
14 | ||
![]() |
![]() |
![]() |
13 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.20454.791+11
- 2.862293.746+12
- 3.44265.872+6
- 4.355192.649+3
- 5.851229.788+3
- 6.324122.726+5
- 7.951414.697-1
- 8.400315.559+4
- 9.690109.864+5
- 10.730443.622+5
Replay highlight
VS
-
cblanco ★
-
보드카 중대
-
VonManteuffel
-
Heartless Jäger

Einhoven Country

Honor it
15

Download
1479
Board Info
387 users are online:
387 guests
0 post in the last 24h
0 post in the last week
9 posts in the last month
0 post in the last week
9 posts in the last month
Registered members: 58059
Welcome our newest member, j88livenet1
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, j88livenet1
Most online: 2043 users on 29 Oct 2023, 01:04 AM