Page 3 of 4
Posted: Tue May 03, 2005 1:43 pm
by k47a
Thanks so much!!!
// remove the docs
// should have a trigger_use with a setthread to this thread.
// i dont remember the command, but you also need to clear that object and set a new one after this
Trigger_use? Not trigger_multiple as said in the tut? And what does
setthread to this thread
exactly mean? And what about "clear and object"
Posted: Tue May 03, 2005 2:37 pm
by Rookie One.pl
Trigger_multiple is triggered when a player enters its volume. Trigger_use is triggered when a player presses use in its volume. It's really up to you.
Setthread is a method of calling threads by the trigger itself so that you don't need a loop to be running. You can set it by the entity properties window in Radiant:
1. Select the trigger.
2. Hit N.
3. Enter key/value:
setthread my_thread_label
And when the trigger is triggered, it will create a ScriptThread instance at the label given with the self object being the trigger.
IvaN wrote:And what about "clear and object"
I don't understand it either.

Posted: Tue May 03, 2005 2:38 pm
by lizardkid
i was certain i commented it more than that...
ok, a setthread is a key/value, when something is triggered (like somebody making a trigger go off or an AI hitting a certain pathnode) it calls the thread in the setthread. So in this case, have your trigger have a key/value of
setthread/lorrydisable
also i made a typo with a capital so that script wont work

edited.
with objective.scr, it has routines for making, showing, showing as current obj, and clearing obj's. But, i haven't used objectives in a long time so i don't remember what the setting as done method is...One of the stock map scripts will have it in it, or one of the tuts
EDIT:
clear that object
clear the objective
typo.
Posted: Tue May 03, 2005 3:49 pm
by k47a
So, I got it like this (yeah, I thought it should be with 's'):
main:
//////////////////
level waittill spawn
//////////////////
thread prep
thread objs
end
objs:
//handles the objectives for the mission.
$documents_tirgger waittill trigger
waitthread global/objectives.scr::add_objectives 1 2 "Steal the documents." $documents.origin //compass!
waitthread global/objectives.scr::current_objectives 1
end
objective1:
$player playsound pickup_papers
$documents remove
iprintln "Document taken."
end
(I took out all the useless stuff (well, useless in this case))
So, when I trigger the docs, they disappear, that's fine. What doesn't work is that I don't really "obey my orders", that is, do what's said when hitting tab. I can take the documents (btw, when doing so, I get a message in German, although all the rest I scripted is in English) but then the compass still points to where they actually were...
I checked with the m2/1 script and just took over some things...
What do I have to change or add to make things work smooth?
Btw, I got a setthread on (?) the trigger (cnt/1 and setthread/objectives1)...
Posted: Tue May 03, 2005 6:25 pm
by lizardkid
right, you need to tell the objectives script to show that obj as "finished".
Straight from m1l1
Code: Select all
waitthread global/objectives.scr::add_objectives 1 3 "Infiltrate the German occupied village."
object 1, type 3.
type 1 is it's hidden
type 2 is it's shown
type 3 is it's done.
example...
Code: Select all
waitthread global/objectives.scr::add_objectives 1 3 "Infiltrate the German occupied village." ( -6296 1640 480)
waitthread global/objectives.scr::add_objectives 2 2 "Check the door." $ending_door.origin
waitthread global/objectives.scr::add_objectives 3 1 "Man the MG42 mounted machine gun." $mg42.origin
waitthread global/objectives.scr::add_objectives 4 1 "Hold off the reinforcements." $mg42.origin
waitthread global/objectives.scr::add_objectives 5 1 "Continue on your mission." $endthelevel.origin
waitthread global/objectives.scr::current_objectives 2
obj 1 (Infiltrate) is finished, thus the 3. obj 2 (Check the Door) is current, thus the 2, if it's current it needs to be shown. and all others are 1, because they're not shown.
So your script would use...
Code: Select all
objective1:
$player playsound pickup_papers
$documents remove
iprintln "Document taken."
waitthread global/objectives.scr::add_objectives 1 3 "Steal the documents." $documents.origin //compass!
waitthread global/objectives.scr::current_objectives 0
end
This line is not needed, since your trigger is already got it's thread to start when it's triggered, this waittill is just wasting processor power.
Code: Select all
$documents_tirgger waittill trigger
Posted: Wed May 04, 2005 1:03 pm
by k47a
Ay! It works

. Is it possible the get the message when I took the docs in English? Would I have to make an inprintln-thing in the script (Like Rookie did for the truck)?
Posted: Wed May 04, 2005 2:51 pm
by lizardkid
Yep, You'll have to choose a way to display the thingie (centerprint, iprintln locationprint etc) and then use that in your script, i believe stufftext is the command used for MP, not sure though. Check
the Rjukan Project.
Posted: Wed May 04, 2005 6:38 pm
by k47a
Yeah, check out that link...
But, thanks a lot!
Posted: Wed May 04, 2005 6:50 pm
by Green Beret
Why is it so easy for companies to let just anyone say there the owner of the site, And give them there passwords for the site, Should be more protection against this kinda thing!
http://gronnevik.se/rjukan/ <------Hacked
Posted: Wed May 04, 2005 6:50 pm
by lizardkid
i actually didnt put that there... putting a real link in now.
EDIT: holy shit you're right beret, that is hacked.
Posted: Wed May 04, 2005 6:59 pm
by Rookie One.pl
Note that centerprint does not work.
Posted: Wed May 04, 2005 7:04 pm
by lizardkid
actually a server can send centerprint t all clients, CI does it. i dont kno how but i know it's possible.
Posted: Wed May 04, 2005 8:45 pm
by k47a
lizardkid wrote:
EDIT: holy shit you're right beret, that is hacked.
Yeah, I saw that - they actually even say it (top line)... I wonder how's that possible
They sure have to hack the site I need

!
Hell, I'm a real stupid kid: I just deleted my script

... Wonder how I managed... Sure glad there's an almost finished version posted here *regaining consciousness*...
Posted: Wed May 04, 2005 9:29 pm
by lizardkid
Yeah, I saw that - they actually even say it (top line)... I wonder how's that possible
They sure have to hack the site I need !
They use roundabout exploits and hidden files publicly accessable to all users but that only crackers know about. then they simply take over the site, replace with whatever they want, and laugh it up.
for instance i know how to get the password for any Windows user simplyby using two floppies a simple compression program and DOS.
Posted: Wed May 04, 2005 10:19 pm
by Green Beret
http://gronnevik.se/rjukan/
EDIT:Oh so now its fixed....Happy Happy Joy Joy