Custom Buildables - random spawning, shaders, etc.

broken avatar :(
Created 1282 days ago
by Archaicvirus
0 Members and 1 Guest are viewing this topic.
11,394 views
broken avatar :(
×
broken avatar :(
Location: gbLiingston West Lothian
Date Registered: 22 December 2016
Last active: 85 days ago
Posts
3
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
×
d-2-k's Groups
d-2-k's Contact & Social Links
Dude this is epic worked flawlessly wish i could understand all the code and hints to do the same with the shield ive read over everything about 20 times my eyes glaze over my brain melts so bloody frustrating i guess its true what they say cant teach an old dog new tricks lol    :derp:
broken avatar :(
×
broken avatar :(
Location: usSouth Florida
Date Registered: 10 July 2016
Last active: 38 days ago
Posts
106
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
Signature
Let he who has not sinned cast the first stone.
×
Archaicvirus's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Archaicvirus's Contact & Social Links
Lol you're funny dude. Naw it's not that hard man. Trust me, there are way more experienced coders here than I ever will be. I always point people towards the folder in your games root directory. It's called docs_modtools. There's lots of documentation in there, everything from workflows to add custom assets, entity field data, even the api with example functions. There's plenty of tutorials here for scripting, but I learn a lot just looking through the help forums, you can see a lot of example code to learn from. Let me know if you need help doing you're own buildable. As long as you have the idea put together I don't mind helping you with the scripting.
broken avatar :(
×
broken avatar :(
Location: gbLiingston West Lothian
Date Registered: 22 December 2016
Last active: 85 days ago
Posts
3
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
×
d-2-k's Groups
d-2-k's Contact & Social Links
(dude that's freekin awesome) just really want to do the same with the shield i have a shield buildable  already  but no hud or fx, the sounds i got with the script from uptown but its a lot more simpler than the one you done and doesn't have fx or random spawn locations tbh its taken me so long just to learn how to use the tools for mapping as i never done any of this b4 black ops 3 radiant, then came across this site and modme and everyone both here and there are so helpful they were throwing prefabs up  with easy to follow drag n drops  so i guess i just assumed thats how it was done BOY was i wrong in my 40's now the only code i ever learned was way back on the Commadore and Amstrad days

example: 10 print you cant script for shit
              20 goto 10
              run

              lmfao

but thanks for pointing me to the docs_modtools ill have a look over it when i get peace and quite l8r tonight (ah the joys of parenthood)

thanks again Archaicvirus
broken avatar :(
×
broken avatar :(
Location: jp
Date Registered: 26 June 2016
Last active: 9 days ago
Posts
86
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
Conbini2017's Groups
Conbini2017's Contact & Social Linksdadakhrconbini2017
I would like to be of assistance, but I have added two buildables, but when I make it the shader will not disappear.
Please show me an example script.
Last Edit: December 26, 2017, 01:44:04 am by Conbini2017
broken avatar :(
×
broken avatar :(
Location: usSouth Florida
Date Registered: 10 July 2016
Last active: 38 days ago
Posts
106
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
×
Archaicvirus's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Archaicvirus's Contact & Social Links
Post your code, and I'll take a look. Also, tell me what you did in radiant so I can determine if your buildables are set up correctly.
broken avatar :(
×
broken avatar :(
Location: jp
Date Registered: 26 June 2016
Last active: 9 days ago
Posts
86
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
Conbini2017's Groups
Conbini2017's Contact & Social Linksdadakhrconbini2017
I am not confident of the code.
This is part_shader_logic code I touched.

function part_shader_logic(shader, position, size_x, size_y){
hud = position - 1;
self.shader_var[hud] = NewClientHudElem(self);
self.shader_var[hud].alignX = "right";
self.shader_var[hud].alignY = "top";
self.shader_var[hud].horzAlign = "user_right";
self.shader_var[hud].vertAlign = "user_top";
if(self IsSplitScreen())
self.shader_var[hud].y = ((size_y * position) + 10) - 25;
else
self.shader_var[hud].y = ((size_y * position) + 10);
self.shader_var[hud].x = -5;
self.shader_var[hud] setShader(shader, size_x, size_y);
self waittill("power_crafted");
self waittill("pap_crafted");
foreach(shader in self.shader_var){
shader Destroy();
}
}
broken avatar :(
×
broken avatar :(
Location: usSouth Florida
Date Registered: 10 July 2016
Last active: 38 days ago
Posts
106
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
×
Archaicvirus's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Archaicvirus's Contact & Social Links
I am not confident of the code.
This is part_shader_logic code I touched.

function part_shader_logic(shader, position, size_x, size_y){
hud = position - 1;
self.shader_var[hud] = NewClientHudElem(self);
self.shader_var[hud].alignX = "right";
self.shader_var[hud].alignY = "top";
self.shader_var[hud].horzAlign = "user_right";
self.shader_var[hud].vertAlign = "user_top";
if(self IsSplitScreen())
self.shader_var[hud].y = ((size_y * position) + 10) - 25;
else
self.shader_var[hud].y = ((size_y * position) + 10);
self.shader_var[hud].x = -5;
self.shader_var[hud] setShader(shader, size_x, size_y);
self waittill("power_crafted");
self waittill("pap_crafted");
foreach(shader in self.shader_var){
shader Destroy();
}
}
I don't know what you mean by not confident, but at the bottom you have
self waittill("pap_crafted")
. Why?  Are you also sending a notify "pap_crafted"? Without doing
 player notify("pap_crafted")
the call
self waittill("pap_crafted")
will halt the function and wait forever until that notify is sent. In the function part_shader_logic, 'self' is an alias for the player that the function is being called on.

 

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
Loading ...