UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

CoDScript Sublime Text Syntax and auto-completion

broken avatar :(
Created 9 years ago
by Deleted User
0 Members and 1 Guest are viewing this topic.
4,549 views
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Spent few hours to make a CoDScript Sublime Text Syntax, which is an updated version of the one that is on the internet (forgot who originally made it). Function list thanks to DUKIP
It also includes some useful auto-completions, like infinite loop and NewHudElem with text. Need ideas for more of them, please suggest them in topic.

Install:
Open packages directory

Copy the archive contents there

It will appear as CoDScript2 in Syntax menu
Known issues:
- Currently it contains mostly SP functions but I doubt anyone scripts for MP anymore
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Dude, so awesome. Been wanting this and haven't had time to look into it.

Quick question, I usually use ctrl+/ to comment things out, using c++ syntax in sublime, but when switching to codscript syntax, it no worky anymore. Any advise? Its why I stopped using the old version actually.


Edit: Also, would you know how to add a for loop auto complete? Where it then multi cursor selects the var, say players?
Nvmind mind on this one, used your stuff and made it myself. Thanks again! You wouldn't know how to add a hint or default text would you?
Editing the CoDScript2.sublime-completions
Added this after FlagEnemyUnattackable line
Code Snippet
Plaintext
{ "trigger": "for(", "contents": "for(${1})" },
and added this after "newHUDElem\tText with a comma at the end of the previous line of course.
Code Snippet
Plaintext
{ "trigger": "for\tText: Global", "contents": "for(i=0;i<${1}.size;i++){\n\t${1}[i] thread ${2};\n}" }

Adding all kinds, this is fun.
Spoiler: click to open...
{ "trigger": "for", "contents": "for(${1})" },
{ "trigger": "players", "contents": "players = get_players()" },
{ "trigger": "flag_wait", "contents": "flag_wait()" },


{ "trigger": "for\tfor loop", "contents": "for(${2}=0;${2}<${1}.size;${2}++){\n\t${1}[${2}] thread ${3}();\n}" },
{ "trigger": "flag_wait\t all players connected", "contents": "flag_wait(\"all_players_connected\");\n" },
{ "trigger": "flag_wait\t electricity on", "contents": "flag_wait(\"electricity_on\");\n" },
{ "trigger": "players\tplayers", "contents": "players = get_players();\nfor(i=0;i<players.size;i++){\n\tplayers thread ${1}();\n}\n" },
{ "trigger": "players\tplayers with flag", "contents": "flag_wait(\"all_players_connected\");\nplayers = get_players();\nfor(i=0;i<players.size;i++){\n\tplayers thread ${1}();\n}" }

Last Edit: June 24, 2015, 06:30:32 pm by MakeCents
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Quick question, I usually use ctrl+/ to comment things out, using c++ syntax in sublime, but when switching to codscript syntax, it no worky anymore. Any advise? Its why I stopped using the old version actually.
Will look into this, will release a fix when I find out.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Will look into this, will release a fix when I find out.

cool, I copied the whole C.tmLanguage over to the Codscript one and it worked, so I know its in there, lol. I didn't leave it that way of course cause it breaks the auto complete and who knows what else.
Last Edit: June 24, 2015, 06:15:39 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Will look into this, will release a fix when I find out.
I got it to work for commenting, and I made a gsc and a csc separate auto complete with full common function lists. Here is the file to add to your packages to get commenting to work. The auto complete I am still working on when I get time. PM me if interested.
http://www.mediafire.com/download/loqo6bri1byv9vb/Comments_(CodScript).rar


Answer found here:
http://stackoverflow.com/questions/26701960/how-do-i-get-comment-toggle-to-work-with-my-own-tmlanguage-syntax-for-sublime-te
Last Edit: June 26, 2015, 12:16:53 pm by MakeCents

 
Loading ...