spawn question

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
CTpenok
Corporal
Posts: 41
Joined: Tue Oct 21, 2003 10:01 am
Location: Netherlands
Contact:

spawn question

Post by CTpenok »

Hi all,

Is it possible to spawn a Crane in a spearhead stock map ?

And if so , does anybody know where the crane.tik is located ?
When I look at the static objects thumbs over here http://uzaiuzai.hp.infoseek.co.jp/pic/static/static.htm it says its located at static/equipment

so I tried:

local.static = spawn script_model
local.static model "static/equipment/crane.tik"
local.static.origin = ( 2630 -6334 -511 )
local.static.angles = ( 0 -168 0 )
local.static solid

But that didn't work :(

Am I doing something wrong or is it just not possible ?
Image
User avatar
knuko
Lance Corporal
Posts: 19
Joined: Tue Feb 15, 2005 10:20 am

hey

Post by knuko »

Maybe:


level waittill prespawn

thread crane

level waittill spawn

crane:
local.static = spawn script_model
local.static model "static/equipment/crane.tik"
local.static.origin = ( 2630 -6334 -511 )
local.static.angles = ( 0 -168 0 )
local.static solid
end

must be work!! :roll:
Hey, i gonna learn scripting :)
CTpenok
Corporal
Posts: 41
Joined: Tue Oct 21, 2003 10:01 am
Location: Netherlands
Contact:

Post by CTpenok »

Thanks knuko,

That should work I guess, but the problem is I tought the crane could be found in pak0.pk3 (models/static/crane.tik) looking at the name of the thumb but its not there :(

So I guess I'll have to search again for the real name.
If somebody knows the real name please let me know.

Here's an image of the crane...
Image
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

open it in Rad, hit N, find in the little window near the bottom a value called model, and that's your model.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
CTpenok
Corporal
Posts: 41
Joined: Tue Oct 21, 2003 10:01 am
Location: Netherlands
Contact:

Post by CTpenok »

Thanks lizardkid,

I allready did that but I used the classname instead of the model name :?
So thanks a lot for pointing that out :)

It now works but, when I do it like this


level waittill prespawn

thread crane

level waittill spawn

crane:
local.static = spawn script_model
local.static model "miscobj/crane.tik"
local.static.origin = ( 2671 -6477 -506 )
local.static.angles = ( 0 90 0 )
local.static solid
end

its solid but I can't walk under the crane :( and when I do
local.static notsolid
I can walk under the crane but also through the crane itself.

So I want the crane itself to be solid but everybody must be able to walk underneath it.

Any suggestions ?
Image
Unreal_Demon
Lance Corporal
Posts: 15
Joined: Sat Jan 22, 2005 12:21 am

Post by Unreal_Demon »

Make the crane notsolid, but then spawn other models and hide them to block of the parts you want to be solid. Personally, I use clip brushes.
Admin @ Unrealmod
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Unreal, it's a stock map, you can't use clip brushes.

You can use script_objects instead - see this thread.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Unreal_Demon
Lance Corporal
Posts: 15
Joined: Sat Jan 22, 2005 12:21 am

Post by Unreal_Demon »

Code: Select all

	local.clipbrush2 = spawn script_object
	local.clipbrush2.origin = ( 4614.75 -1854.40 10 )
	local.clipbrush2.angles = ( 0 0 0)
	local.clipbrush2 setsize ( -195 -80 -2 ) ( 195 60 110 )
	local.clipbrush2 solid
	local.clipbrush2 nodamage
This is what I ment. Im too used to calling it clip brush than script_object.
Admin @ Unrealmod
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

level waittill prespawn

thread crane

level waittill spawn

crane:
also, your code should look like this.

Code: Select all

level waittill prespawn 

thread crane 

level waittill spawn 

end

crane: 
otherwise it's gonig to run regardless of if you call teh crane thread or not, in fact you may have two of them because you're calling it and it's naturally going to do that anyway. the end ends the main thread and lets crane start ;)
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
CTpenok
Corporal
Posts: 41
Joined: Tue Oct 21, 2003 10:01 am
Location: Netherlands
Contact:

Post by CTpenok »

Thanks all for your help !

I got it where I want now and made the crane notsolid and spawned some other models and hide them like Unreal_Demon said. Works fine with this crane but I like to try the script_objects too sometime for some other things so thanks for the thread Rookie One. Looks interesting.
Image
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Unreal_Demon wrote:

Code: Select all

	local.clipbrush2 = spawn script_object
	local.clipbrush2.origin = ( 4614.75 -1854.40 10 )
	local.clipbrush2.angles = ( 0 0 0)
	local.clipbrush2 setsize ( -195 -80 -2 ) ( 195 60 110 )
	local.clipbrush2 solid
	local.clipbrush2 nodamage
You'll be able to shoot through this brush.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

because of nodamage. in fact i doubt script objects die, so try it without that first ;)
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Unreal_Demon
Lance Corporal
Posts: 15
Joined: Sat Jan 22, 2005 12:21 am

Post by Unreal_Demon »

Rookie One wrote:You'll be able to shoot through this brush.
Nope.
Admin @ Unrealmod
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Want to bet? ;)
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Post Reply