PDA

View Full Version : Advanced Scripting Help for my Biggest Mod.



BrandonDR
8th May 2024, 14:33
Hello, i am currently developing a big mod for Call of Duty 2 and i have some scripting questions since i am an amateur modder, btw this is my first time posting here, my question is:

is there a way to script the equivalent of the cod2 multiplayer spectator but for singleplayer? or is it posible to execute console commands via scripting? i would like to create a flying system for singleplayer or just be able to execute "noclip" via the map .gsc, i would like to be able to fly a jet-pack model i imported for use as a easter-egg for my mod.

This is my mod's page: https://www.moddb.com/mods/the-mexican-revolution-mod

0RBohRgwLk
23rd May 2024, 02:06
hi BrandonDR


is there a way to script the equivalent of the cod2 multiplayer spectator but for singleplayer?
you want to spectate bots?


is it posible to execute console commands via scripting?
on multiplayer we can make player to execute commands using a .menu file opened from gsc as explained here: https://killtube.org/showthread.php?1261-player-execClientCommand(-quot-say-boobs-quot-)

to make player to fly you might be interested about trying to modify his velocity/gravity/speed maybe... it can be done in multiplayer, why not in singleplayer too
you might also be interested to try /ufo instead of /noclip if not done yet :)

BrandonDR
25th May 2024, 01:24
Thanks for the reply, but where do i type the commands like /ufo in the script?

0RBohRgwLk
25th May 2024, 01:59
Thanks for the reply, but where do i type the commands like /ufo in the script?

:)

in MP we can do this on players:

gsc:


precacheMenu("clientCmd");
...
player openMenu("clientCmd");


and in the downloaded clientCmd.menu file:


...
onOpen
{
exec "noclip";
}
...



This is the technique from the link i sent above

maybe you could try to do it in SP

______

I'm not aware of a technique to achieve this without using a .menu file

BrandonDR
27th May 2024, 20:37
I managed to make it work, thanks! but i find out it only works starting the map as spdevmap map_name