objective scripting --> objective updating

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
Franko74
Corporal
Posts: 45
Joined: Sat Jan 03, 2004 12:48 am
Location: Hungary
Contact:

objective scripting --> objective updating

Post by Franko74 »

Hi,
i make script to my SP Map, and have some problem.

- how i can do the next:

1. player should get new objective/s* when he hits something (wall, door, foxhole)
* kill the officer, destroy the enemy, etc.

2. player couldn't use enemy weapon (or he can pick up, he couldn't get ammo)

thx:
F74
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Code: Select all

		waitthread global/objectives.scr::add_objectives 1 2 "Make you way to the bridge and stop the germans from blowing it up"  $bridgeobjective
		waitthread global/objectives.scr::add_objectives 2 3 "Clear the farm "
after the add_objectives in the first example is objective number 1 and the 2 makes it current

in the second example obj 2 is set to 3 which make it show up as done

waitthread global/objectives.scr::current_objectives 1

makes obj 1 the one that shows on the compass in this case $bridgeobjective that an entity or even a script origin

when an objective is complete you redo the same lines and change if it is done or not . I do it in a thread that handles objectives

I think you can set a ai to not drop weapons and set level to not drop health when killed

like this I think

level.nodrophealth = 1
level.dontdropweapons = 1
User avatar
Franko74
Corporal
Posts: 45
Joined: Sat Jan 03, 2004 12:48 am
Location: Hungary
Contact:

Post by Franko74 »

thanks, bd :)
Post Reply