Animated shutters>i don't understand something !

Post your scripting questions / solutions here

Moderator: Moderators

Danker
Lance Corporal
Posts: 11
Joined: Wed Dec 31, 2003 5:31 pm
Location: France

Animated shutters>i don't understand something !

Post by Danker »

Ok so I say it now: i am french and so i can make some awful mistakes, my appologies in advance :roll: !! lol

So in the anated shutters tutorial, I've watched that we could add a line in the script: thread global/shutter.scr::shuttrig 1 !!

I've read many times what Surgeon had written to explain the function of this line...but I still have not understood... ! lol :cry: :cry:

So could you explain me the meaning of these line and what does it make in the game with simpliest ( or more simply ) words... to allow me to understand !!!

Thank you for your answer ! :)
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

thread global/shutter.scr::shuttrig 1, in short means

open folder global,
open file shutter.scr
read the thread shuttrig
and carry the variable 1 for where it is needed
hope this helps, prob not cos it's all foreign 2 me :-/
Danker
Lance Corporal
Posts: 11
Joined: Wed Dec 31, 2003 5:31 pm
Location: France

Post by Danker »

Ok, so you'll think i'm a real foolish (lol) !!

But if i've understood crectly what was in this shutter.scr, when you shoot on one shutter which have The Key/value #group/1, the others shutters who have the same Key/value should move together such like the first (the one I shoot in) ! I'm wrong ? :?:

Ok, but in the game that's not the case.... :x

Why ?? :shock:
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

The response of the shutters to shooting is not handled by this shuttrig thread (only called from outside this script), but by the 'shutterthink' thread.

Code: Select all

shutterthink:

	self waittill damage
		if (self.specevent == 0)
		if (randomint(100) > 50)
			self.specevent = 11
			else
			self.specevent = 10

	thread shutterthink
end
This code looks ugly as hell to me (even worse than a goto ;)) but it's pretty obvious this only affects the shutter that's been shot.
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

event

Post by tltrude »

It is an event you can add to an explosion thread, or a thread to scare the player. It makes the two shutters "slam" (move fast with a bang noise). Normally the event is random but, by using that line, it can be forced.

It will only happen one time when the line is read, and only to the two shutters that have "#group 1". If you use "2" at the end of the line, the "#group 2" shutters will do the event, and so on.

Hope that helps.
Tom Trude,

Image
Danker
Lance Corporal
Posts: 11
Joined: Wed Dec 31, 2003 5:31 pm
Location: France

Post by Danker »

Ok, thank you, you're realy nice boys !! :wink: :wink: :D

so if i've understood crectly, i can put this line, for exemple after a tank explosion ( commanded by the script ) and, when the lines of this explosion will be write, the thread global/shutter.scr::shuttrig 1 will be write too and will be executed at this moment !!

I'm wrong ???
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

No... actually you're right :P
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

MEN

Post by tltrude »

We are nice MEN!!! Boys are not that smart. 8-)
Tom Trude,

Image
Tropheus
Corporal
Posts: 49
Joined: Sun Sep 14, 2003 11:19 pm
Location: france
Contact:

Post by Tropheus »

hello danker.
we have to speak english here (two frenchies on this forum).

happy to meet you on this forum.

Guys his idea is great and works nicely. (good effect)

happy new year

Tropheus
Danker
Lance Corporal
Posts: 11
Joined: Wed Dec 31, 2003 5:31 pm
Location: France

Post by Danker »

Hi Tropheus, Nice to see you here too !!
:wink: :wink:

Thanks for MEN who answered me and help me to understand....what' i hadn't understood !! :D

But i have another question: The animation also include songs...
But in the game, when i open the console ( with ? ), i see that : shuttershit_1 (or something like that ) need an allias in the ubersound.scr or uberdialog_scr !!!

So i've tries to do a precache but it doesn't works...can you help me ? please...

I've also heard that a programmation could create a z.pk3 which incude all the allias of the game....and is the last pk3 to be read by the game !!
But it doesn't work at me... :cry: :cry:

Can you help me...?? :roll:
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

sounds

Post by tltrude »

The shutter sounds only work for the singleplayer map "m1l1" and all map names that start with "m5". But, you can add an ubersound work-around to get them working for your map. Here is a link to the custom sounds tutorial page.

/t.php?id=11
Tom Trude,

Image
Danker
Lance Corporal
Posts: 11
Joined: Wed Dec 31, 2003 5:31 pm
Location: France

Post by Danker »

These are not costom sounds.... :cry: :cry:

To make an ubersound, what name i give to it ??
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

shuttercrap_1 :)
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

rename

Post by tltrude »

Try renaming your map to:

m5_mymapname.bsp
Tom Trude,

Image
Danker
Lance Corporal
Posts: 11
Joined: Wed Dec 31, 2003 5:31 pm
Location: France

Post by Danker »

I tried it...but in vain !!!! :cry: :x :x

Why, when i create a precache it doesn't work ???
Post Reply