- Joined
- Jul 29, 2007
- Messages
- 5,174
I wonderd if people who know some custom scrips can post what ever they know (with descriptions on when/how/what to use it) here, because a huge number of things that can't be done with pure GUI, can be done with GUI + custom scrips.
There are probably pretty much endless list, but please try to post as much as you can, especialy more common/usefull ones.
(If people will really post a lot of custom scrips I suggest making this a sticky)
Thanks in advance
LIST
Removeing Locations
You will need to use this to remove leaks, whenever you set a new point it will make a new point and not move the old point.
Removing Unit Groups
Removing a Trigger
Getting a location's Z and setting it to another variable
2. Setting Real to be worth the Z (height) of someLocation.
Single Player Check
Destroy Player Groups
Getting Local Player
Exit a Loop
If - then
end If
Explode on death
[NOTICE] The custom script commands (such as RemoveLocation, DestroyTrigger) MUST be typed like they are here with big letters on each word (Case Sensitive).
For example:
RemoveLocation works.
removelocation won't work.
Any mistakes ? Correct me
(Hope more will come from YOU)
There are probably pretty much endless list, but please try to post as much as you can, especialy more common/usefull ones.
(If people will really post a lot of custom scrips I suggest making this a sticky)
Thanks in advance
LIST
Removeing Locations
- Custom script: call RemoveLocation(udg_Point)
- -------- Normal point --------
- Custom script: call RemoveLocation(udg_Point[X])
- -------- Point with harrays --------
You will need to use this to remove leaks, whenever you set a new point it will make a new point and not move the old point.
Removing Unit Groups
- Custom script: set bj_wantDestroyGroup = true
- -------- Put this in [B]before[/B] you pick a group and it will remove the group leaks --------
- Custom script: DestroyGroup(someGroup)
- -------- Destroys someGroup --------
Removing a Trigger
- Custom script: call DestroyTrigger(gg_trg_Trigger)
- -------- Change "Trigger" into your own trigger's name --------
- Custom script: call DestroyTrigger(GetTriggeringTrigger())
- -------- Put this into your trigger so after you finished using it, it will delete itself --------
Getting a location's Z and setting it to another variable
- Custom script: GetLocationZ(someLocation)
- Custom script: set udg_Real = GetLocationZ(udg_someLocation)
2. Setting Real to be worth the Z (height) of someLocation.
Single Player Check
- Custom script: bj_isSinglePlayer
Destroy Player Groups
- Custom script: DestroyForce(someForce)
Getting Local Player
- Custom script: GetLocalPlayer()
Exit a Loop
- Custom script: exitwhen val
If - then
- Custom script: if val then
end If
- Custom script: endif
Explode on death
- Custom script: SetUnitExploded(someUnit,val)
[NOTICE] The custom script commands (such as RemoveLocation, DestroyTrigger) MUST be typed like they are here with big letters on each word (Case Sensitive).
For example:
RemoveLocation works.
removelocation won't work.
Any mistakes ? Correct me
(Hope more will come from YOU)
Last edited: