Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: soul-toktzt
Can anyone help me out with this?
I'm making platforms on the ground with only a certain route / path that's solid and i'd like to have that once you jump on a non-solid one, it'll disappear.
(i'm probably wrong with this but can i just use trigger use_touch with this?)
Thanks in advance :) .
ModmeBot:
Reply By: mathfag
You need a trigger_multiple
You can use brushes instead of models
functiondissapearing_platform(){trig_1=GetEnt("platform_trig_1","targetname");trig_2=GetEnt("platform_trig_2","targetname");trig_3=GetEnt("platform_trig_3","targetname");//as many as you have platformsmodel_1=GetEnt("platform_model_1","targetname");model_2=GetEnt("platform_model_2","targetname");model_3=GetEnt("platform_model_3","targetname");//you see where this is going...trig_1SetHintString("");trig_1SetCursorHint("HINT_NOICON");trig_2SetHintString("");trig_2SetCursorHint("HINT_NOICON");trig_3SetHintString("");trig_3SetCursorHint("HINT_NOICON");while(1){trig_1waittill("trigger",player);trig_1Delete();model_1Delete();break;}while(1){trig_2waittill("trigger",player);trig_2Delete();model_2Delete();break;}while(1){trig_3waittill("trigger",player);trig_3Delete();model_3Delete();break;}}
I never tested this but here it is just to give you an idea about how it should be
ModmeBot:
Reply By: soul-toktzt
mathfag
You need a trigger_multiple
You can use brushes instead of models
functiondissapearing_platform(){trig_1=GetEnt("platform_trig_1","targetname");trig_2=GetEnt("platform_trig_2","targetname");trig_3=GetEnt("platform_trig_3","targetname");//as many as you have platformsmodel_1=GetEnt("platform_model_1","targetname");model_2=GetEnt("platform_model_2","targetname");model_3=GetEnt("platform_model_3","targetname");//you see where this is going...trig_1SetHintString("");trig_1SetCursorHint("HINT_NOICON");trig_2SetHintString("");trig_2SetCursorHint("HINT_NOICON");trig_3SetHintString("");trig_3SetCursorHint("HINT_NOICON");while(1){trig_1waittill("trigger",player);trig_1Delete();model_1Delete();break;}while(1){trig_2waittill("trigger",player);trig_2Delete();model_2Delete();break;}while(1){trig_3waittill("trigger",player);trig_3Delete();model_3Delete();break;}}
I never tested this but here it is just to give you an idea about how it should be
oooeh, i'll try it after i've finished this zombies game. :)
If i use brushes instead of model, i have to change model_1 to brush_1, right?
also wouldn't i be possible to use a FOR? Because i have around 30 non-solid platforms.
or something like count++;
ModmeBot:
Reply By: mathfag
soul-toktzt
mathfag
You need a trigger_multiple
You can use brushes instead of models
functiondissapearing_platform(){trig_1=GetEnt("platform_trig_1","targetname");trig_2=GetEnt("platform_trig_2","targetname");trig_3=GetEnt("platform_trig_3","targetname");//as many as you have platformsmodel_1=GetEnt("platform_model_1","targetname");model_2=GetEnt("platform_model_2","targetname");model_3=GetEnt("platform_model_3","targetname");//you see where this is going...trig_1SetHintString("");trig_1SetCursorHint("HINT_NOICON");trig_2SetHintString("");trig_2SetCursorHint("HINT_NOICON");trig_3SetHintString("");trig_3SetCursorHint("HINT_NOICON");while(1){trig_1waittill("trigger",player);trig_1Delete();model_1Delete();break;}while(1){trig_2waittill("trigger",player);trig_2Delete();model_2Delete();break;}while(1){trig_3waittill("trigger",player);trig_3Delete();model_3Delete();break;}}
I never tested this but here it is just to give you an idea about how it should be
oooeh, i'll try it after i've finished this zombies game. :)
If i use brushes instead of model, i have to change model_1 to brush_1, right?
also wouldn't i be possible to use a FOR? Because i have around 30 non-solid platforms.
or something like count++;
to be honest with you i dont know jack shit about scripting but i'm learning form this site and i try to help where i can.
You don't need to change model_1 to brush_1, you can call it potato if you want (it says model_1 in my script because i copied it from 1 of my scripts). That's just the name you'll be using in the script for example:
potato_1Delete();
Also note that you can't have 2 models or brushes with the same targetname or nothing will happen. I learned this the hard way
also i suggest you add text everytime something is supposed to happen
iprintinbold("text");
ModmeBot:
Reply By: soul-toktzt
mathfag
soul-toktzt
mathfag
You need a trigger_multiple
You can use brushes instead of models
functiondissapearing_platform(){trig_1=GetEnt("platform_trig_1","targetname");trig_2=GetEnt("platform_trig_2","targetname");trig_3=GetEnt("platform_trig_3","targetname");//as many as you have platformsmodel_1=GetEnt("platform_model_1","targetname");model_2=GetEnt("platform_model_2","targetname");model_3=GetEnt("platform_model_3","targetname");//you see where this is going...trig_1SetHintString("");trig_1SetCursorHint("HINT_NOICON");trig_2SetHintString("");trig_2SetCursorHint("HINT_NOICON");trig_3SetHintString("");trig_3SetCursorHint("HINT_NOICON");while(1){trig_1waittill("trigger",player);trig_1Delete();model_1Delete();break;}while(1){trig_2waittill("trigger",player);trig_2Delete();model_2Delete();break;}while(1){trig_3waittill("trigger",player);trig_3Delete();model_3Delete();break;}}
I never tested this but here it is just to give you an idea about how it should be
oooeh, i'll try it after i've finished this zombies game. :)
If i use brushes instead of model, i have to change model_1 to brush_1, right?
also wouldn't i be possible to use a FOR? Because i have around 30 non-solid platforms.
or something like count++;
to be honest with you i dont know jack shit about scripting but i'm learning form this site and i try to help where i can.
You don't need to change model_1 to brush_1, you can call it potato if you want (it says model_1 in my script because i copied it from 1 of my scripts). That's just the name you'll be using in the script for example:
potato_1Delete();
Also note that you can't have 2 models or brushes with the same targetname or nothing will happen. I learned this the hard way
also i suggest you add text everytime something is supposed to happen
iprintinbold("text");
oooh okay ;o i'm (trying) to implement it right now, i'll let you know if something happens.
edit: i Don't think it works, named the trigger "platform_trig_1" and brush "platform_model_1", but the brush doesn't disappears.
This is a dumb question, but am i supposed to add something in the main? I feel like i need to.
edit 1: I got it working :) Thank you very much for the script. :D
(i added
levelthreaddissapearing_platform();
under
zm_usermap::main();
ModmeBot:
Reply By: soul-toktzt
Well i did alot of testing and it works. But only in order from 1 to 54 (for me).
Is there a way so the platforms dissappear randomly?
I mean, i found out that you have to touch the triggers in order from 1 to 54. You can't just jump on the 9th one to make it go away. It HAS to be 1 then 2 then 3 then 4 etc.
ModmeBot:
Reply By: mathfag
soul-toktzt
Well i did alot of testing and it works. But only in order from 1 to 54 (for me).
Is there a way so the platforms dissappear randomly?
I mean, i found out that you have to touch the triggers in order from 1 to 54. You can't just jump on the 9th one to make it go away. It HAS to be 1 then 2 then 3 then 4 etc.
idk if theres an easier way but you can put each trigger and model in a separate function
Well i did alot of testing and it works. But only in order from 1 to 54 (for me).
Is there a way so the platforms dissappear randomly?
I mean, i found out that you have to touch the triggers in order from 1 to 54. You can't just jump on the 9th one to make it go away. It HAS to be 1 then 2 then 3 then 4 etc.
idk if theres an easier way but you can put each trigger and model in a separate function