mirror of
https://github.com/InfinityLoader/IL-GSC.git
synced 2025-07-09 15:07:57 -05:00
Added AW, BO2, Ghosts, IW, MWR, WW2 Scripts
This commit is contained in:
32
BO2/Xbox/MP/codescripts/character_mp.gsc
Normal file
32
BO2/Xbox/MP/codescripts/character_mp.gsc
Normal file
@ -0,0 +1,32 @@
|
||||
/*******************************************************************
|
||||
* Decompiled By: Bog
|
||||
* Decompiled File: codescripts\character_mp.gsc
|
||||
* Game: Call of Duty: Black Ops 2
|
||||
* Platform: Console
|
||||
* Function Count: 3
|
||||
* Decompile Time: 6 ms
|
||||
* Timestamp: 10/27/2023 3:04:04 AM
|
||||
*******************************************************************/
|
||||
|
||||
#include codescripts/character;
|
||||
|
||||
//Function Number: 1
|
||||
setmodelfromarray(a)
|
||||
{
|
||||
self setmodel(a[randomint(a.size)]);
|
||||
}
|
||||
|
||||
//Function Number: 2
|
||||
precachemodelarray(a)
|
||||
{
|
||||
for(i = 0;i < a.size;i++)
|
||||
{
|
||||
precachemodel(a[i]);
|
||||
}
|
||||
}
|
||||
|
||||
//Function Number: 3
|
||||
attachfromarray(a)
|
||||
{
|
||||
self attach(codescripts/character::randomelement(a),"",1);
|
||||
}
|
29
BO2/Xbox/MP/codescripts/delete.gsc
Normal file
29
BO2/Xbox/MP/codescripts/delete.gsc
Normal file
@ -0,0 +1,29 @@
|
||||
/*******************************************************************
|
||||
* Decompiled By: Bog
|
||||
* Decompiled File: codescripts\delete.gsc
|
||||
* Game: Call of Duty: Black Ops 2
|
||||
* Platform: Console
|
||||
* Function Count: 1
|
||||
* Decompile Time: 4 ms
|
||||
* Timestamp: 10/27/2023 3:04:04 AM
|
||||
*******************************************************************/
|
||||
|
||||
//Function Number: 1
|
||||
main()
|
||||
{
|
||||
/#
|
||||
assert(IsDefined(self));
|
||||
#/
|
||||
wait(0);
|
||||
if(IsDefined(self))
|
||||
{
|
||||
/#
|
||||
println("");
|
||||
println("*** trigger debug: delete.gsc is deleting trigger with ent#: " + self getentitynumber() + " at origin: " + self.origin);
|
||||
println("");
|
||||
self.classname == "trigger_once" || self.classname == "trigger_radius" || self.classname == "trigger_multiple"
|
||||
IsDefined(self.classname)
|
||||
#/
|
||||
self delete();
|
||||
}
|
||||
}
|
41
BO2/Xbox/MP/codescripts/struct.gsc
Normal file
41
BO2/Xbox/MP/codescripts/struct.gsc
Normal file
@ -0,0 +1,41 @@
|
||||
/*******************************************************************
|
||||
* Decompiled By: Bog
|
||||
* Decompiled File: codescripts\struct.gsc
|
||||
* Game: Call of Duty: Black Ops 2
|
||||
* Platform: Console
|
||||
* Function Count: 3
|
||||
* Decompile Time: 8 ms
|
||||
* Timestamp: 10/27/2023 3:04:05 AM
|
||||
*******************************************************************/
|
||||
|
||||
//Function Number: 1
|
||||
initstructs()
|
||||
{
|
||||
level.struct = [];
|
||||
}
|
||||
|
||||
//Function Number: 2
|
||||
createstruct()
|
||||
{
|
||||
struct = spawnstruct();
|
||||
level.struct[level.struct.size] = struct;
|
||||
return struct;
|
||||
}
|
||||
|
||||
//Function Number: 3
|
||||
findstruct(position)
|
||||
{
|
||||
foreach(key, _ in level.struct_class_names)
|
||||
{
|
||||
foreach(s_array in level.struct_class_names[key])
|
||||
{
|
||||
foreach(struct in s_array)
|
||||
{
|
||||
if(distancesquared(struct.origin,position) < 1)
|
||||
{
|
||||
return struct;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user