Detecting if entity has hit a wall or roof!?
Moderator: Moderators
Detecting if entity has hit a wall or roof!?
--------------------------------------------------------------------------------
hello. is it possible to detect if a moving entity hits a wall or roof of a house or something?
if(istouching$bomb==1){
iprintln "touching house"
}
hello. is it possible to detect if a moving entity hits a wall or roof of a house or something?
if(istouching$bomb==1){
iprintln "touching house"
}
ok
ok, wont that only detect people?
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
i am trying to bomb.hehe
well i have a bomb that falls to the floor but if it is over a roof it goes through the roof..
i want to make it detect if it hits the roof and stop mooving.
i want to make it detect if it hits the roof and stop mooving.
oposite/.nope
i wnat it not to go throuh the roof...so if it hits a roof it stops. but if their is no roof it hits the floor
What I do is do a trace from the bomb down like this
local.bottom_spot = ($airraid_speaker.origin + ( 0 0 -2048))
local.spot = trace $airraid_speaker.origin local.bottom_spot 0
local.bomb= spawn script_model "targetname" "bomb"
$bomb model "ammo/us_bomb.tik"
$bomb.origin = $airraid_speaker.origin
$bomb.angles= ( 90 0 0 )
$bomb notsolid
$bomb playsound drop_bomb
$bomb speed 800
$bomb moveto local.spot
$bomb waitmove
$bomb immediateremove
The trace gives you a spot where it hit something .
local.bottom_spot = ($airraid_speaker.origin + ( 0 0 -2048))
local.spot = trace $airraid_speaker.origin local.bottom_spot 0
local.bomb= spawn script_model "targetname" "bomb"
$bomb model "ammo/us_bomb.tik"
$bomb.origin = $airraid_speaker.origin
$bomb.angles= ( 90 0 0 )
$bomb notsolid
$bomb playsound drop_bomb
$bomb speed 800
$bomb moveto local.spot
$bomb waitmove
$bomb immediateremove
The trace gives you a spot where it hit something .
wow
yay i love u.lol. ok...
it works great.ty:P
ok. when i try to spawn fire...it always spawns at 0 0 0. but if i change the model wiht the same code. it spawns at the origin i gave it.. is it different for fire?
it works great.ty:P
ok. when i try to spawn fire...it always spawns at 0 0 0. but if i change the model wiht the same code. it spawns at the origin i gave it.. is it different for fire?
:(
the fire just will not spawn ina coord:@
are you using
spawn models/fx/fire.tik "origin" "x y z"
???
if that's not the path then just right click for the big popup window and find the fire you want and replace fx/fire.tik with the modelname that appears in the entity properties window.
spawn models/fx/fire.tik "origin" "x y z"
???
if that's not the path then just right click for the big popup window and find the fire you want and replace fx/fire.tik with the modelname that appears in the entity properties window.
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006


