November 26 2024 08:35:13
Navigation
· Home
· Articles
· Downloads
· FAQ
· Discussion Forum
· Web Links
· News Categories
· Contact Me
· Photo Gallery
· Search
· Gameservers
Languages
Users Online
· Guests Online: 52

· Members Online: 0

· Total Members: 1,134
· Newest Member: Brody
Teamspeak 3
Last Seen Users
· hackepter10:05:26
· GONZO16:11:51
· Intruder16:38:34
· Sully 1 day
· desintegrator 2 days
· WEZ 2 days
· Homi 3 days
· The ACE 4 days
· xhc 1 week
· dRgiGGLeZ 1 week
· El Dookie 1 week
· Melber 2 weeks
· SGT PEPPER 2 weeks
· martyr 2 weeks
· Terminator 2 weeks

View Thread: Scripting
Vietcong.Info » Vietcong General Discussion » Maps & Mapping
Who is here? 1 Guest
Current Rating: (Total: 0 ratings)  
 Print Thread
Scripting
Sheppard
Hey guys, i'm totally lame at scripting and i want to change it. First thing need to know is how to attach an object to a script in level.c, than i'd like to know, how make VC to Rush, and to not shoot, but only attack with bayonet. Thanks for answers :)
 
KostiCZ
1. In LEVEL.C somewhere in section:

case SC_LEV_MES_INITSCENE:

add line similar as:

SC_SetObjectScript("killer","levels\\DEATHVALLEY\\DATA\\Valley_SqB_real\\SCRIPTS\\KILLER.C"Wink;

Where killer is name of object in editor and killer.c is script



2. Try to use
void SC_P_Ai_EnableShooting(dword pl_id, BOOL enable);
This function will enable/disable shooting for specified player. You can use it in player script (AI script). But I think if you disable shooting, they will not attack by bayonet, this is not supported by game engine. But you can try it.
Signature________________________________________________

2LT William Theolinus "KostiCZ" Boner Jr.
LRRP Squad Baker, Delta Team
cache.www.gametracker.com/player/KostiCZ/63.143.47.189:2302/b_560x95.png
 
Teamrespawn.cz
Sheppard
Ok, Ill try that

Well it looks like i will have to make VC shoot, but theres still a question, how to make VC Rush? You know, just run at you. And it would be best, if the would not shoot very much in that rush, so they'll be not so much lethal
 
KostiCZ
void SC_P_Ai_Go(dword pl_id, c_Vector3 *vec);
This function will send the AI to the specified place vec. AI in the battle mode will move there, but it is possible it will change it’s target in the battle! There is also a possibility the AI will block somewhere and it won’t go – for the script mode you should check periodically if the AI is moving.


Everything is in SDK manual. It is better to use this function for all AI in coop.c in server tick, or also you can use it in AI script but you need to use it after every restart, so modification of script (checking of gPhase and use of this command after every restart) is needed.
Signature________________________________________________

2LT William Theolinus "KostiCZ" Boner Jr.
LRRP Squad Baker, Delta Team
cache.www.gametracker.com/player/KostiCZ/63.143.47.189:2302/b_560x95.png
 
Teamrespawn.cz
Sheppard
Okay, Okay, Okay, not so fast Grin
1. Where (in what script) and how to define c_Vector3? I found something in Vietcong Scriting html document, but it doesn't say very much.
And is it possible to make more than one Vector3?
2. "but you need to use it after every restart, so modification of script (checking of gPhase and use of this command after every restart) is needed.", what modification have i to do?
 
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
CTF Scripting with DM gun respawn Vietcong Tech Talk 28 30-12-2011 09:21
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Render time: 0.32 seconds - 55 Queries 5,472,238 unique visits