This Group was created for people who love to create maps and missions on the GEM 2 Engine.
A fake bullet entity to be used for the firing of fake projectiles when a unit has died read the description and increment the code into your human.inc while using the fake bullet entity and bombing file in the download.
Human.inc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;ON SPAWN;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;Sounds to link;;;;;;;;;;
{link_sound "rifle" "weapon/shot/rifle"}
{link_sound "smg" "weapon/shot/smg/type2smg_burst"}
{link_sound "pistol" "weapon/shot/pistol"}
{link_sound "mgun" "weapon/shot/mgun/bar_burst"}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;ON SPAWN END;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;DIE WITH BLOOD;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Change this to any number
{if rand 0.9 {tags add "last_shot"}} ;When units die, their hand can twitch and the gun will fire, like in those action movies
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
{if tagged "riflew" ;last_shot scarface
{if rand 0.3 {delay 0.1 {call "last_shot"}}
else rand 0.3 {delay 0.4 {call "last_shot"}}
else {delay 0.8 {call "last_shot"}}}}
{if tagged "pistolw"
{if rand 0.3 {delay 0.1 {call "last_shot"}}
else rand 0.3 {delay 0.4 {call "last_shot"}}
else {delay 0.8 {call "last_shot"}}}}
{if tagged "smgw"
{if rand 0.3 {delay 0.1 {call "last_shot"}{delay 0.1 {call "last_shot"}}{delay 0.2 {call "last_shot"}}{delay 0.3 {call "last_shot"}}{delay 0.4 {call "last_shot"}}{delay 0.5 {call "last_shot"}}{delay 0.6 {call "last_shot"}}{delay 0.7 {call "last_shot"}}{delay 0.8 {call "last_shot"}}}
else rand 0.3 {delay 0.4 {call "last_shot"}{delay 0.1 {call "last_shot"}}{delay 0.2 {call "last_shot"}}{delay 0.3 {call "last_shot"}}{delay 0.4 {call "last_shot"}}{delay 0.5 {call "last_shot"}}{delay 0.6 {call "last_shot"}}{delay 0.7 {call "last_shot"}}{delay 0.8 {call "last_shot"}}}
else {delay 0.8 {call "last_shot"}{delay 0.1 {call "last_shot"}}{delay 0.2 {call "last_shot"}}{delay 0.3 {call "last_shot"}}{delay 0.4 {call "last_shot"}}{delay 0.5 {call "last_shot"}}{delay 0.6 {call "last_shot"}}{delay 0.7 {call "last_shot"}}{delay 0.8 {call "last_shot"}}}
}}
{if tagged "mgunw"
{if rand 0.3 {delay 0.1 {call "last_shot"}{delay 0.1 {call "last_shot"}}{delay 0.2 {call "last_shot"}}{delay 0.3 {call "last_shot"}}{delay 0.4 {call "last_shot"}}{delay 0.5 {call "last_shot"}}{delay 0.6 {call "last_shot"}}{delay 0.7 {call "last_shot"}}{delay 0.8 {call "last_shot"}}}
else rand 0.3 {delay 0.4 {call "last_shot"}{delay 0.1 {call "last_shot"}}{delay 0.2 {call "last_shot"}}{delay 0.3 {call "last_shot"}}{delay 0.4 {call "last_shot"}}{delay 0.5 {call "last_shot"}}{delay 0.6 {call "last_shot"}}{delay 0.7 {call "last_shot"}}{delay 0.8 {call "last_shot"}}}
else {delay 0.8 {call "last_shot"}{delay 0.1 {call "last_shot"}}{delay 0.2 {call "last_shot"}}{delay 0.3 {call "last_shot"}}{delay 0.4 {call "last_shot"}}{delay 0.5 {call "last_shot"}}{delay 0.6 {call "last_shot"}}{delay 0.7 {call "last_shot"}}{delay 0.8 {call "last_shot"}}}
}}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;DIE WITH BLOOD END;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;Place anywhere;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
{on "last_shot" ; this is for the people who have the jamming tutorial
{if tagged "riflew" {if tagged "last_shot" {call "fire_gundead"}}}
{if tagged "smgw" {if tagged "last_shot" {call "fire_gundead"}}}
{if tagged "pistolw" {if tagged "last_shot" {call "fire_gundead"}}}
{if tagged "mgunw" {if tagged "last_shot" {call "fire_gundead"}}}
}
{on "fire_gundead"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SOUNDS FOR WEAPON TYPE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
{if tagged "riflew" {play_sound "rifle"} } ;will play weapon shot sounds
{if tagged "smgw" {if rand 0.75 {play_sound "smg"}} }
{if tagged "pistolw" {play_sound "pistol"}}
{if tagged "mgunw"{if rand 0.75 {play_sound "mgun"}} }
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Fake Muzzle Flash;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
{view show "flashbarrel"}{view start "flashbarrel"}{delay 0.5{view pause "flashbarrel"}{view stop "flashbarrel"} } ;firing effect
{spawn "bulletf" "foresight3" x {impulse forward 200 no_position}{gravity -5}} ;cx 5 2 cy 5 2 cz 5 2} } ;fire fake bullet
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;Place anywhere end;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;link_weapon;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define "tags_remove" ; so weapons switch their data on weapon switch.
{tags remove "pistolw mgunw riflew shotgunw smgw sniperw flamew"} ;remove old tags
{tags add %weap} ;
)
{on "link_weapon"
{if stuff "pistol"
{add_view "flash_gun_small" "flashbarrel" "foresight3"}
{add_view "shell_smg" "shell" "FXshell"}
("tags_remove" weap("pistolw")) ;
else stuff "shotgun"
{add_view "flash_gun_big" "flashbarrel" "foresight3"}
{add_view "shell_shotgun" "shell" "FXshell"}
("tags_remove" weap("shotgunw")) ;
else stuff "rifle"
{add_view "flash_gun_small" "flashbarrel" "foresight3"}
{add_view "shell_mgun" "shell" "FXshell"}
("tags_remove" weap("riflew")) ;
else stuff "smg"
{add_view "flash_gun_small" "flashbarrel" "foresight3"}
{add_view "shell_smg" "shell" "FXshell"}
("tags_remove" weap("smgw")) ;
else stuff "mgun"
{add_view "flash_gun_big" "flashbarrel" "foresight3"}
{add_view "shell_mgun" "shell" "FXshell"}
("tags_remove" weap("mgunw")) ;
else stuff "flame_thrower"
{add_view "flamer_fire" "flame" "foresight3"}
{add_view "flamer_fire_barrel" "fire" "foresight3"}
{view show "fire"}
{view start "fire"}
("tags_remove" weap("flamew")) ;
else
{view hide "flashbarrel"}
{view pause "flashbarrel"}
{view pause "flame"}
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;link_weapon end;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;Blast_Hit;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
{if stuff "bullete"
{if rand 0.05 ("health_damage" c(190))
else rand 0.1 ("health_damage" c(25))
else rand 0.1 ("health_damage" c(35))
else rand 0.1 ("health_damage" c(45))
else rand 0.1 ("health_damage" c(55))
else rand 0.1 ("health_damage" c(65))
else rand 0.1 ("health_damage" c(75))
else rand 0.1 ("health_damage" c(85))
else rand 0.1 ("health_damage" c(95))
else rand 0.1 ("health_damage" c(105))
else rand 0.1 ("health_damage" c(115))
else rand 0.1 ("health_damage" c(125))
else rand 0.1 ("health_damage" c(135))
else ("health_damage" c(65))}
}
;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;Blast_Hit End;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;Place Anywhere Outside of {"Human" bracket;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;
{"bulletf"
{on "loop"
;{if altitude 5{delete}} ;if the height is above 5 , prevent bullet from getting to the four corners of the map lol
{if not altitude 0.15{delete}} ;if the height is below 0.15, prevent bullet from getting to the ground since the animation had the gun pointed in the wrong direction. And in Snow, it causes an explosion, FIXED
{spawn "bullete" "basis"{stuff_detonate}} ;else the small explosion that connects damage when you search for ;bullete
{if rand 0.015 {start_sound "sonne2/effects/bullet_crack"}};{link_sound "crack" "sonne2/effects/bullet_crack"}{play_sound "crack"}} ;CTA bullet crack sounds
{delay 0.001 {call "loop"}}
}
{on spawn
{add_view "tracefa" "tracefa" "basis"}
;{add_view "bullet_tail" "bullet_tail" "basis"}
{view start "tracefa"}
{delay 1 {delete}}
{scale from 0.05 to 0.05 time 0.1}
;{view start "tracefa"}
;no_position}
;{gravity 1}
{delay 0.05 {call "loop"}{tags add "looped"}}
}
{on contact
{if tagged "looped"
{if not "contact"
{set "contact" 1}
{spawn "ex_bul_sm"}
{delete}
}}}
{on ground_hit
{if tagged "looped"
{if not "contact"
{set "contact" 1}
{spawn "ex_bul_sm"}
{delete}
}}}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;Place Anywhere Outside of {"Human" bracket End;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Average
-0 votes submitted.
not enough time to add a more perfect description and video :(
Basically the soldier hand siezes as he dies causing him to fire