Author |
Topic: Trigger a model |
arachnofang |
|
General Member Since: Nov 16, 2008 Posts: 505 Last: Sep 9, 2012 [view latest posts] |
|
|
|
Sevenz |
|
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
Category: CoDWW MP Mapping Posted: Wednesday, Jan. 18, 2012 10:23 pm |
|
do you mean an actual player or a (static) player model you spawned?
either way, you'd do something like this in script:
Code: <br />
trig = getent("trig", "targetname");<br />
trig thread move_model_think();<br />
<br />
move_model_think() {<br />
// add endon conditions here<br />
<br />
for (;;) {<br />
self waittill("trigger", player);<br />
<br />
// add tests here, e.g. isplayer() or if player is actually playing etc...<br />
<br />
org = spawn("script_origin", self.origin);<br />
player linkto(org);<br />
org moveto( (123, 456, 789), 3);<br />
org waittill("movedone");<br />
org unlink();<br />
org delete();<br />
<br />
}<br />
}<br />
|
|
|
|
arachnofang |
|
General Member Since: Nov 16, 2008 Posts: 505 Last: Sep 9, 2012 [view latest posts] |
|
|
Category: CoDWW MP Mapping Posted: Wednesday, Jan. 18, 2012 11:07 pm |
|
Hi Sevenz, thanx for the quick reply.
Basically for now what I want to do is just put a char model from the xmodel folder in my map, I want to hide him behind a door, when some sneaks into a corner where there is only one way in and one way out, I want him to trigger the char model to come towards him and trap him completely, part of the floor slides back so that he ends up standing on a hurt trigger, he can't go anywhere because he is now trapped, so he ends up dying, once I have it worked out i'm hoping to replace it with a Jack the ripper model, I will also be using a really scary jack the ripper voice as the player is being slashed to pieces.
I hope you understood all that, (I was getting myself confused)
Anyway, I'm gonna need help with this so any you can give me would be great.
Thanx, Ian.
|
|
|
|
Tally |
General Member Since: Apr 21, 2005 Posts: 819 Last: Oct 26, 2012 [view latest posts] |
|
|
Category: CoDWW MP Mapping Posted: Thursday, Jan. 19, 2012 07:21 am |
|
arachnofang writes...Quote: Hi Sevenz, thanx for the quick reply.
Basically for now what I want to do is just put a char model from the xmodel folder in my map, I want to hide him behind a door, when some sneaks into a corner where there is only one way in and one way out, I want him to trigger the char model to come towards him and trap him completely, part of the floor slides back so that he ends up standing on a hurt trigger, he can't go anywhere because he is now trapped, so he ends up dying, once I have it worked out i'm hoping to replace it with a Jack the ripper model, I will also be using a really scary jack the ripper voice as the player is being slashed to pieces.
I hope you understood all that, (I was getting myself confused)
Anyway, I'm gonna need help with this so any you can give me would be great.
Thanx, Ian.
You would do it like Sevenz posted, with the use of moveto() (or movex()).
Be advised - all you would be doing is moving the character model like a mannequin. You wont be able to animate it, because there is no bot AI in Multiplayer other than that for testclients, and for that you would need to disable punkbuster.
And if you were thinking of doing that, i.e. introducing a bot, to get a bot to do what you want is possible, but requires that you introduce custom animations into playeranim.script file, and setting the animations on the bot via the use of a weapon with the custom animation in it (like Pezbot or meatbot does).
Personally, if I were you, I would abandon the idea. It will look dumb to move a static character model like a mannequin in order to trap a live player. It would be better if you conceived some other way to trap them. Maybe some sort of moving block that slides across the room when the player triggers a trigger? |
|
|
|
arachnofang |
|
General Member Since: Nov 16, 2008 Posts: 505 Last: Sep 9, 2012 [view latest posts] |
|
|
Category: CoDWW MP Mapping Posted: Thursday, Jan. 19, 2012 12:23 pm |
|
Thanx, Tally,
Basically all I want is to move the model (like you say) like a mannequin, normally it would look a little dumb, but because Jack the ripper has a cloak his body and legs are covered so no animation needed, the distance it has to travel is very minimal so will hardly be noticable, also, he will always be behind something, like a counter etc, the basic idea is! the ghost of Jack the ripper popping up all over the map,
It might help if I explain a little about my map.
mp_london_1888
It's set in whitechapel victorian london at the time of Jack the ripper, it#s night time with a prevailing fog around all the cobbled streets, Theres a wharf/quay next to the river thames with old tug boats, crates, barrels etc, the exploding barrels are wooden ones, there is an underground sewer system, secret trapdoors in some of the buildings and manhole covers in the street that you can open to gain access to the sewer, there are double and single sliding doors you can open to access warehouses etc, there are doors and sash windows you can open to gain access to houses (you just gotta find them) I haave actually only just finished all the scripts for all these doors etc, so now the player doesn't get stuck or trapped in them complete with sound as well, I have old street lamps with glow effect, all sorts of creature sounds, gas hiss sound when near a street lamp, various ambient sounds, custom background eerie music. basically everything you would expect to hear and see in 1888 Victorian london. theres a lot more but too much to go into.
This will probably be my last map as I was diagnosed with terminal cancer last year which is why I'm trying to make this map a bit special.
You can see what I'm trying to achieve in the next post WIP mp_london_1888
Thanx, Ian. |
|
|
|
Tally |
General Member Since: Apr 21, 2005 Posts: 819 Last: Oct 26, 2012 [view latest posts] |
|
|
Category: CoDWW MP Mapping Posted: Thursday, Jan. 19, 2012 02:11 pm |
|
arachnofang writes...Quote: Thanx, Tally,
Basically all I want is to move the model (like you say) like a mannequin, normally it would look a little dumb, but because Jack the ripper has a cloak his body and legs are covered so no animation needed, the distance it has to travel is very minimal so will hardly be noticable, also, he will always be behind something, like a counter etc, the basic idea is! the ghost of Jack the ripper popping up all over the map,
It might help if I explain a little about my map.
mp_london_1888
It's set in whitechapel victorian london at the time of Jack the ripper, it#s night time with a prevailing fog around all the cobbled streets, Theres a wharf/quay next to the river thames with old tug boats, crates, barrels etc, the exploding barrels are wooden ones, there is an underground sewer system, secret trapdoors in some of the buildings and manhole covers in the street that you can open to gain access to the sewer, there are double and single sliding doors you can open to access warehouses etc, there are doors and sash windows you can open to gain access to houses (you just gotta find them) I haave actually only just finished all the scripts for all these doors etc, so now the player doesn't get stuck or trapped in them complete with sound as well, I have old street lamps with glow effect, all sorts of creature sounds, gas hiss sound when near a street lamp, various ambient sounds, custom background eerie music. basically everything you would expect to hear and see in 1888 Victorian london. theres a lot more but too much to go into.
This will probably be my last map as I was diagnosed with terminal cancer last year which is why I'm trying to make this map a bit special.
You can see what I'm trying to achieve in the next post WIP mp_london_1888
Thanx, Ian.
Sorry to hear about your illness. I too have just gotten over the Big C.
As for your idea, it sounds good. Rather than post dummy examples here on the forums, the best thing you can do is contact someone who can do the scripting for you. That will save a lot of faffing around with post after post trying to work out the details. Contact me via PM if you want me to do it for you. |
|
|
|