NOTE: I was refraining from posting this question for a while because I wasn't sure if it would violate the 'no requests' rule in this thread. But I figured, I would let the moderators decide if this crosses the line in that sense.
I was searching through the forum a while back for ideas to contribute to the community, and I found a very appealing script provided by meteorite, that allows you to shoot a lock in order to open the door that script is applied to. I wanted to make a model of a padlock and share it with other users as my first contribution to the site, for all the help everyone has been giving my thus far. Here is his original post:
http://forum.thegamecreators.com/?m=forum_view&t=143285&b=23
And here is the lock's snipplet:
;Artificial Intelligence Script
;Header
desc = door lock
;Triggers
:state=0,shotdamage=1:activateifused=1,destroy
;End of Script
...And the door's script:
;Artificial Intelligence Script
;Header
desc = Key Door (Open 'With Key' and Close)
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecoretextlockeddoor.tga,hudname=keydoorprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=60:hudshow=keydoorprompt,hudfadeout=keydoorprompt
:state=10,activated=1:state=5
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,plrdistfurther=60:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=10,setframe=0
:state=5,plrdistwithin=60,plrusingaction=1:setframe=0,sound=$0,state=1
;End of Script
I tried this in my game and it works
great--I'm very happy with it! But, I wanted to make it more realistic and was wondering if it was possible to fake an animation of the lock actually falling off the door after it was shot.
The concept was to create two models of a padlock. One of these models was the locked padlock, and the other was a model of a broken padlock (i.e. the lock after being shot). I was wondering how (if even possible) to add to the lock's script so that when the player shoots the lock entity, it makes it dissapear, and INSTANTLY spawns the broken lock model in the same spot, in which that model will fall to the ground? Creating the illusion the lock was destroyed when shot. I guess I am ultimately asking someone that knows how to script to provide the modification to this code to make it work (which is why I was unsure about posting this in violation to the rules)so I could finally start to contribute back for all my questions answered. Thanks.
-Kravenwolf