Yeah the group type variables among other types are now handled by the garbage collector in the sc2 script engine. So unless theres an explicit definition of a function that removes a certain type of variable, the map makers will have no control over when to remove these types. They will be removed when they are no longer needed, according to the script engine. But my guess is that you don't have to worry about it that much.
This is from the native script inside the base mpq:
// -- Complex types and automatic deletion --// // Many native types represent "complex" objects (i.e. larger than 4 bytes). The script language// automatically keeps track of these objects and deletes them from memory when they are no longer// used (that is, when nothing in the script references them any longer). The types which benefit// from automatic deletion are://// abilcmd, bank, camerainfo, marker, order, playergroup, point,// region, soundlink, string, text, timer, transmissionsource, unitfilter, unitgroup, unitref,// waveinfo, wavetarget//// Other object types must be explicitly destroyed with the appropriate native function when you// are done using them.
This is not a solution, more of a suggestion. How about making it so whenever you go into an interior it changes to first person? It would be a quick fix until (if) someone comes up with a camera solution.
Move the Order action below the Create action. The variable "Last created unit" is set to the last created unit BEFORE you have the action. And you create the unit afterwards, so it just misses it.
The reason you only see "Instant" abilities (requiring no target) is because that is the default order type selected. You have to change the order type from "Order with no target" to "Order targeting point" or "Order targeting unit" depending on what you want to do. Then you can find the attack, move and any other ability which requires a target point or unit.
Why would you even wanna have a function like that. The variable "Triggering Player" is already an integer, you just have to convert it from a preset to an integer with the Convert Preset to Int function.
Yeah it's probably some editor bug. I still haven't fixed the camera issue yet though, but am still trying.
EDIT: Found the bug. I didn't think it was related to the issue but I tried having the UI hidden, and it worked! I tested with disabling the action in your map as well, which enables the UI, and the camera problem arises.
So apparently showing the default game UI (or parts of it) will mess with your camera.
It seems the global function (not named in your case) has a parameter and a heap of local variables that are not named, hence they all are named lp_ and lv_ respectively (in the generated code).
To fix it go about and search for the function in the trigger window (it should be a defined "action" or function similar to a trigger).
EDIT:
Oh I found it, it's the function called 'Traceline', and it's defined as an "action". You should name the parameter and all local variables, as well as the function itself.
Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Unit - Remove (Picked unit) from the game
Just replace Any Player with the player number you want and Entire Map with the region you want.
I've tried messing around with the camera settings and camera actions in the triggers, but to no avail.
Yes I have the follow unit group thing and it does follow the unit but causes this weird camera movement if the pitch is too high or too low.
Like in WoW, if you move the camera to the ground, it doesn't actually go below the ground even if it seemed like it would, it will instead
move along the ground but also move further away from your hero.
It's the same here, and also it happens when you change your pitch so it shows the top of the unit, the camera starts moving about, not focusing
on the unit but rather getting shaky with the unit as it's center of attention.
Also, right now I have the settings exactly like in your map. But it still does this annoying movement.
0
@HellGateSc2: Go
Yeah the group type variables among other types are now handled by the garbage collector in the sc2 script engine. So unless theres an explicit definition of a function that removes a certain type of variable, the map makers will have no control over when to remove these types. They will be removed when they are no longer needed, according to the script engine. But my guess is that you don't have to worry about it that much.
0
This is from the native script inside the base mpq:
0
@Kanaru: Go
This is not a solution, more of a suggestion. How about making it so whenever you go into an interior it changes to first person? It would be a quick fix until (if) someone comes up with a camera solution.
0
@deathdealingjawa: Go
Move the Order action below the Create action. The variable "Last created unit" is set to the last created unit BEFORE you have the action. And you create the unit afterwards, so it just misses it.
0
@Cheezeh: Go
The reason you only see "Instant" abilities (requiring no target) is because that is the default order type selected. You have to change the order type from "Order with no target" to "Order targeting point" or "Order targeting unit" depending on what you want to do. Then you can find the attack, move and any other ability which requires a target point or unit.
0
@Purgatus: Go
Why would you even wanna have a function like that. The variable "Triggering Player" is already an integer, you just have to convert it from a preset to an integer with the Convert Preset to Int function.
0
@torrasqu: Go
Try using "((Unit type of (Triggering unit)) is Hero) == true" instead. And "Player In Player Group" instead of the one you got.
0
@DarkForce9999: Go
I don't think so. You could make your own action definitions if you want to split up the trigger a bit.
0
@DarkForce9999: Go
Create a new trigger.
0
@martinolsson: Go
Yeah it's probably some editor bug. I still haven't fixed the camera issue yet though, but am still trying.
EDIT: Found the bug. I didn't think it was related to the issue but I tried having the UI hidden, and it worked! I tested with disabling the action in your map as well, which enables the UI, and the camera problem arises. So apparently showing the default game UI (or parts of it) will mess with your camera.
0
@LordFelco: Go
It seems the global function (not named in your case) has a parameter and a heap of local variables that are not named, hence they all are named lp_ and lv_ respectively (in the generated code).
To fix it go about and search for the function in the trigger window (it should be a defined "action" or function similar to a trigger).
EDIT: Oh I found it, it's the function called 'Traceline', and it's defined as an "action". You should name the parameter and all local variables, as well as the function itself.
Action name: Traceline
Parameter name: Player
Here are the names of the local variables:
0
@Chamenas: Go
Sorry. Glad I could help :)
0
Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Unit - Remove (Picked unit) from the game
Just replace Any Player with the player number you want and Entire Map with the region you want.
0
I've tried messing around with the camera settings and camera actions in the triggers, but to no avail. Yes I have the follow unit group thing and it does follow the unit but causes this weird camera movement if the pitch is too high or too low. Like in WoW, if you move the camera to the ground, it doesn't actually go below the ground even if it seemed like it would, it will instead move along the ground but also move further away from your hero. It's the same here, and also it happens when you change your pitch so it shows the top of the unit, the camera starts moving about, not focusing on the unit but rather getting shaky with the unit as it's center of attention.
Also, right now I have the settings exactly like in your map. But it still does this annoying movement.
0
@Chamenas: Go
Use "Pan Camera"