Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: modric Like reach round 50 and a model appears outside the map... maybe even with a trigger that plays a song or fx or gives the player points.
ModmeBot:
Reply By: Abnormal202
that should give you the round number. It also might help to use waittills such as:
ModmeBot:
Reply By: mathfag
ModmeBot:
Reply By: modric I have this and nothing happens. I want it to spawn in a model and trigger and also play a sound when the round is reached. The model and shootable trigger are shot and then the shootable trig opens a secret door.
ModmeBot:
Reply By: Scobalula
modric I have this and nothing happens. I want it to spawn in a model and trigger and also play a sound when the round is reached. The model and shootable trigger are shot and then the shootable trig opens a secret door. function distant() { level waittill("between_round_over"); if(level.round_number == 5) { IPrintLnBold ("Super Easter Egg confirmed"); }
You need a loop that will constantly check each time then break when you get to round x and execute your code, since this will just return on first notify since it won't be round 5 (it will be round 1 or 2).
To be honest I don't know what your change does exactly. Should I just run function distant() and then this?
ModmeBot:
Reply By: mathfag
modric mathfag whle(1) { level waittill("between_round_over"); if(level.round_number == 50) { do stuff } } To be honest I don't know what your change does exactly. Should I just run function distant() and then this?
the change is that before it only checked once now it does it forever
ModmeBot:
Reply By: modric Since you already helped me with a shootable script, I figured I could use that one and combine with this for the actual reward part of the distant easter egg. I'm sure I screwed something up when combining them but let me know if this would work
ModmeBot:
Reply By: Harry Bo21
instantly
tony_trigs - not defined
and its not like you just mis typed "trig" either - coz that would still be an error - as it isnt an array
doesnt exist - and seemingly would do nothing
syntax error... no parenthesis...
syntax error... no parenthesis... - again ( and thats also round 5 - not 50... )
another error - level.tonytrigs_current is not defined, so that is
"undefined" + 1
which also means that...
is also yet another error... ( infact, even better - its "two" errors in one line )
and
is again - another undefined function
Please pay more attention to the scripts you post to people or refrain from giving them. Thats 7 complete break errors
ModmeBot:
Reply By: modric Thank you for your help Harry with the syntax stuff, I tried to sort out the syntax errors, but still feel the while (1) //repeats forever level waittill("between_round_over"); //when round changes this runs if level.round_number == 5 stuff needs parenthesis. I am more concerned with the concept of the script, that everything lines up, since this is 2 scripts mixed that include some concepts I am not so familiar with. I am going to test it soon assuming the syntax is cleaned up.
ModmeBot:
Reply By: Harry Bo21
still have an error immediatly
trig - is not an array
you still havent added a parenthesis here
5 still isnt 50
is running on "level" not the trig - level has no "target"
is "still" a undeclared variable ( you have spelt it wrong )
ModmeBot:
Reply By: modric yea sorry i left some syntax in there i kind of rushed that, its all cleaned up now.
ModmeBot:
Reply By: mathfag
modric yea sorry i left some syntax in there i kind of rushed that, its all cleaned up now.
modric yea sorry i left some syntax in there i kind of rushed that, its all cleaned up now.
dude your not even paying attention to what im saying
"TRIG" IS NOT AN ARRAY
for the third flipping time
and that is EVEN WORSE and STILL not round 50
this still has no damn {}
posting bad code is one thing, fixing it but missing some is another - but three times? completely ignoring all the major errors that ive literally called out multiple times?
ModmeBot:
Reply By: mathfag
ModmeBot:
Reply By: Harry Bo21 almost
self == level
ModmeBot:
Reply By: mathfag
Harry Bo21 almost model = GetEnt( self.target, "targetname" ); self == level
Ye that line used to be in a new function
ModmeBot:
Reply By: modric I actually made the script nearly from scratch before you posted your new one mathfag, obviously I am not very good at scripting stuff but let me know if I'm on the right track. I'll use yours for my map since its guaranteed to be better, but mine is a start I think.
ModmeBot:
Reply By: Harry Bo21
are you ever gonna learn to use the {} ffs....
"trig" AND "model" are both undeclared variables within this functions space too...
same again here... and "trig" is "self" here anyway...
is not threaded on anything anywhere
test your code... stop posting game and compile crashing errors
ModmeBot:
Reply By: Harry Bo21
this "only" needs a model, no trigger, and to be threaded
ModmeBot:
Reply By: modric OK thanks, just out of curiosity, why did you choose to do model with no trigger in script? I assume I would target the trig with the model with w, but most scripts use trig targeting model. Is there any reason to use one or the other?
ModmeBot:
Reply By: Harry Bo21 1 - dont need a trigger 2 - hit detection will be "exact" 3 - using a trigger "as well" is a waste of your "limited" entities
ModmeBot:
Reply By: modric OK that is much better, I just have never seen model only in a script. Thanks again