SC2Mapster Wiki
Explore
Main Page
All Pages
Interactive Maps
navigation
Main page
Community portal
Recent changes
Random page
Help
SC2MAPSTER
News
Maps
Assets
Teams
Authors
Forums
Paste
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
SC2Mapster Wiki
1,003
pages
Explore
Main Page
All Pages
Interactive Maps
navigation
Main page
Community portal
Recent changes
Random page
Help
SC2MAPSTER
News
Maps
Assets
Teams
Authors
Forums
Paste
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
Editing
Tutorials/Built In Debug Cheats
(section)
Back to page
Edit
VisualEditor
View history
Talk (0)
Edit Page
Tutorials/Built In Debug Cheats
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Make your own cheats== This is done in the Trigger Module. This example cheat will spawn some units at the coordinate (x,y)=(100,100) of the map. *Create a new trigger. *Add a event "TriggerAddEventChatMessage". **The "string" should be something like "SpawnMarine". **The "exact" parameter should be set to "Partial". This will enable you to add parameters to your debugging tool. *Add local string variables "player_str", "count_str" and "unitType_str". *Add local integer variables "player", "count". *Add local unitType variable "unitType". *The syntax of the cheat will be "SpawnMarine 1 5 Marine" which will result in 5 Marines owned by player 1 being created at location (x,y)=(100,100). *Add SetVariable(player_str,(StringWord(EventChatMessage(false,2))) - this will fetch word number 2 from the string and save it to the player_str variable. The StringWord starts counting words with 1, which means that word 0 is always null, and word 1 is always the first word in the sentance. In this case that would be SpawnMarine. *Add SetVariable(count_str,(StringWord(EventChatMessage(false,3))) *Add SetVariable(count_str,(StringWord(EventChatMessage(false,4))) *Convert the string variables into useful integers and unitType. *Add SetVariable(player, (StringToInt(player_str))) - this will convert the string value into a integer value which can be used to actually spawn the unit. *Add SetVariable(count, (StringToInt(count_str))). *Add SetVariable(unitType, (ConvertStringToGameLink(unitType_str))) - this will convert the string in the chat message into a unit type. *Add UnitCreate(count, unitType, player, (Point(100,100)), 270.0, no Options). [[Category:Tutorials]]
Summary:
Please note that all contributions to the SC2Mapster Wiki are considered to be released under the CC BY-NC-SA
Cancel
Editing help
(opens in new window)
Follow on IG
TikTok
Join Fan Lab