[Tutorial] Shootable Triggers

broken avatar :(
Created 796 days ago
by reckfullies
0 Members and 1 Guest are viewing this topic.
23,311 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 12 September 2016
Last active: 8 days ago
Posts
306
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
×
reckfullies's Groups
reckfullies's Contact & Social LinksReckfulliesReckfullies
Its been over a year since I made this, got bored so I've decided to remake it from scratch. With newer games releasing, BO3 isn't really as popular anymore but I'm sure this tutorial will still help someone.

I have tested this multiple times, if for some reason it doesn't work then let me know.

Useful Info
Sorry but you are not allowed to view spoiler contents.

Tutorial
Sorry but you are not allowed to view spoiler contents.




Part 2 - Scripting


  • Open Windows Explorer or any other file browser.
  • Navigate to "root/share/raw/scripts" where "root" is your BO3 game folder.
  • Create a new folder named "custom".
  • Create a new file named "shootable.gsc". Note: You might need to have "show known file extensions" enabled to make it a .gsc
  • Open the newly created file.
  • Paste the code below into that file.
  • Save the file.

Code
Sorry but you are not allowed to view spoiler contents.




Part 3 - Finishing Touches & Compiling


  • Open Windows Explorer or any other file browser.
  • Navigate to "root/usermaps/zm_mapname/scripts/zm" where "root" is your BO3 game folder and "mapname" is your map name.
  • Open "zm_mapname.gsc" where "mapname" is your map name.
  • Below "#using scripts\zm\zm_usermap;" add "#using scripts\custom\shootable;"
  • Find the function "main" and add "thread shootable::init();" at the bottom.
  • Save the file.
  • Navigate to "root/usermaps/zm_mapname/zone_source/zm_mapname.zone" where "root" is your BO3 game folder and "mapname" is your map name.
  • At the bottom of the file add "scriptparsetree,scripts/custom/shootable.gsc".
  • Save the file.
  • Go into your launcher then Compile & Link.
[/spoiler]
Last Edit: May 19, 2018, 04:48:28 am by reckfullies
broken avatar :(
×
broken avatar :(
Location: gbsidcup
Date Registered: 9 May 2015
Last active: 727 days ago
Posts
3
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
×
mindy12345's Groups
mindy12345's Contact & Social Links
can you make  me a script where i shoot 3 teddy bears it gives me electric cherry
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 12 September 2016
Last active: 8 days ago
Posts
306
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
×
reckfullies's Groups
reckfullies's Contact & Social LinksReckfulliesReckfullies
can you make  me a script where i shoot 3 teddy bears it gives me electric cherry

This script can be easily adapted to do just that.

I won't be making scripts for everyone who wants them but here is how to give a perk since its pretty simple:

First, go into the script and add this to the top of the file:
#using scripts\zm\_zm_perks;

Change:
function shootables_done()
to
function shootables_done(player)

then go into each of the shootables(shootable_1 and shootable_2) and change this:
thread shootables_done();
to
thread shootables_done(player);

lastly go back into shootables_done and add this under the IPrintLn:
player zm_perks::give_perk("electric_cherry_perk") // I'm not sure what the perk names are for this function so you would need to find the rest.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 18 February 2015
Last active: 505 days ago
Posts
63
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
Blink-420's Groups
Blink-420's Contact & Social LinksBlink-420
^1    thread function
^1------------------^
^1ERR(0) scripts/custom/shootable.gsc (7,19) in "init()" : syntax error, unexpected TOKEN_FUNCTION, expecting TOKEN_LEFT_BRACKET or TOKEN_IDENTIFIER :     thread function

I got this error when compiling?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 10 January 2016
Last active: 773 days ago
Posts
4
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
×
xTundra's Groups
xTundra's Contact & Social Links
This script can be easily adapted to do just that.

I won't be making scripts for everyone who wants them but here is how to give a perk since its pretty simple:

...


This is pretty dope dude.  Is there anything you can recommend for someone who is trying to learn the basic of gsc scripting?
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 10 days ago
Posts
3,982
Respect
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
^1    thread function
^1------------------^
^1ERR(0) scripts/custom/shootable.gsc (7,19) in "init()" : syntax error, unexpected TOKEN_FUNCTION, expecting TOKEN_LEFT_BRACKET or TOKEN_IDENTIFIER :     thread function

I got this error when compiling?

Try now. OP was missing few underscores. Fixed it for you, OP, since its easy fix + dont want more people having issues
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 9 October 2014
Last active: 221 days ago
Posts
15
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
GNT123's Groups
GNT123's Contact & Social Links
got this error when compiled the map:

^1
^1^
^1ERR(6E) scripts/custom/shootable.gsc (15,0)  : Compiler Internal Error :  Uninitialized local variable 'targetname'

Any thoughts on how to fix?
broken avatar :(
×
broken avatar :(
Location: gbbradford
Date Registered: 26 September 2014
Last active: 568 days ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
harvez's Groups
harvez's Contact & Social Links
I get this error while compiling?

^1}
^1^
^1ERR(6E) scripts/custom/shootable.gsc (18,1)  : Compiler Internal Error :  Uninitialized local variable 'targetname'
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 10 days ago
Posts
3,982
Respect
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
got this error when compiled the map:

^1
^1^
^1ERR(6E) scripts/custom/shootable.gsc (15,0)  : Compiler Internal Error :  Uninitialized local variable 'targetname'

Any thoughts on how to fix?

I get this error while compiling?

^1}
^1^
^1ERR(6E) scripts/custom/shootable.gsc (18,1)  : Compiler Internal Error :  Uninitialized local variable 'targetname'


Reck, I suggest testing your scripts before releasing them. Fixed this one for you as well
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 12 September 2016
Last active: 8 days ago
Posts
306
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
×
reckfullies's Groups
reckfullies's Contact & Social LinksReckfulliesReckfullies
Thanks for fixing all the problems, should have tested it sooner since I wrote this from memory cause I couldn't get on steam at the time.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 9 October 2014
Last active: 221 days ago
Posts
15
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
GNT123's Groups
GNT123's Contact & Social Links
Thanks for fixing all the problems, should have tested it sooner since I wrote this from memory cause I couldn't get on steam at the time.

**** 1 script error(s):
 "function_shootable_1" with 0 parameters in "scripts/custom/shootable.gsc" at line 7 ****
**** Unresolved external "function_shootable_1" with 0 parameters in "scripts/custom/shootable.gsc" ****

Idk if you changed the script but I'm getting this new error now since I recopied and pasted it.
broken avatar :(
×
broken avatar :(
Location: gbUnited Kingdom
Date Registered: 28 December 2014
Last active: 288 days ago
Posts
45
Respect
Forum Rank
Legless Crawler
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Signature
Be sure to follow me on Twitter:
https://twitter.com/CraftDAnimation
×
CraftDAnimations's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Did the OP get updated as I am getting the same error when trying to build!

I get this when launching the game

Last Edit: October 10, 2016, 03:18:35 am by CraftDAnimations
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 12 September 2016
Last active: 8 days ago
Posts
306
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
×
reckfullies's Groups
reckfullies's Contact & Social LinksReckfulliesReckfullies
Did the OP get updated as I am getting the same error when trying to build!

I get this when launching the game

( [You are not allowed to view external links. Register or Login to see them] .)

I think this was a mistake when HitmanVere edited it, ill fix it since function wasn't supposed to be there in the first place.

Re do the part where the script is made, at the top where the functions are threaded they are supposed to be
thread shootable_1();
thread shootable_2();

Just updated OP.
Last Edit: October 10, 2016, 04:18:57 am by reckfullies
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 12 June 2013
Last active: 667 days ago
Posts
1
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
My Contact & Social Links
More
×
88ninjastar's Groups
88ninjastar's Contact & Social Links88ninjastariPhone8
I've updated the script and changed the 2 threads at the top, but now when I run the map and shoot the triggers and models in the game, it says "Lost Connection" and the game freezes and eventually crashes.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 9 October 2014
Last active: 221 days ago
Posts
15
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
GNT123's Groups
GNT123's Contact & Social Links
I think this was a mistake when HitmanVere edited it, ill fix it since function wasn't supposed to be there in the first place.

Re do the part where the script is made, at the top where the functions are threaded they are supposed to be
thread shootable_1();
thread shootable_2();

Just updated OP.
I can get in the game but after I shoot the model my game get connection interrupted.

 
Loading ...