wingieboi
Mortal
posted 29 August 2021 08:53 AM EDT (US)
I'm pulling my hair out at trying to figure out this one...
I'm working on a map with no extra settlements. I made a looping trigger that is supposed to invoke a god power at the location of the player's settlements. Gaia will use the GP, and has vision on each of the players' settlements with a Revealer to Player.
Now I struggle to find what to put here :
rmSetTriggerEffectParam("DstPoint1", ???);
What should I put there to precisely target the starting settlement of each player?
wingieboi
Mortal
posted 29 August 2021 06:54 PM
EDT (US)
2 / 16
I think I can wrap my head around adding custom trigger code. So I would need something like this to retrieve the settlements in question :
kbUnitQuerySetPlayerID("querySettlement"+i, i, true)
kbUnitQuerySetUnitType("querySettlement"+i, "settlement")
kbUnitQueryExecute("querySettlement"+i)
But then what? I find it very difficult to work with those variables because I don't know in what form they are returned. None of the echo functions I saw displayed anything in the debugger so I'm working in the dark. I need to find a way to retrieve their location in a format that can be digested by the Invoke God Power GP but I'm not sure what is it either.
nottud
Demigod
posted 03 September 2021 08:03 AM
EDT (US)
9 / 16
The entire code needs to be inside where you create and switch the trigger - i.e. where the invoke is. For getting variable i in you need to do "+i+" to substitute it in.
My advice is to start with some simple pieces of code and get them working and find what does and doesn't work and work your way up to what you want. I think trying to big bang the whole lot when you are not familiar is proving difficult.
Start with a single trigger that say changes the lighting with a custom command - e.g. sunColor(255, 0, 0); will set lighting to red. If you get that working you know your triggers are running.
wingieboi
Mortal
posted 15 September 2021 05:31 AM
EDT (US)
12 / 16
Even then, it still doesn't fire the triggers.
I was starting to suspect that unitID was empty or wrong, but the line just before about selecting the unit works fine; it selects my town center, but anything past that won't work proprely.
wingieboi
Mortal
posted 23 September 2021 08:53 PM
EDT (US)
16 / 16
Darn it, it still doesn't work... The sun color thing doesn't wear off though, which I guess is a good sign. Knowing that if I put the vectors manually it works, and that the query selects the right unit, the issue probably can't be anywhere else.