Re: I'm desperate for help....


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]

Posted by Stealth on February 03, 1998 at 10:46:38:

In Reply to: I'm desperate for help.... posted by Raptor [JiB] on February 02, 1998 at 12:28:50:

> OK then. I'm making a cog where the player drops a "mouse mine", which they can take control of and drive around, then blow it up in their opponents face. When used, the player gets the mouse's POV, and if either the mouse or player is damaged, the mouse mine explodes and POV shifts back to player.

> The way I have accomplished some of this is to have a template created when the player uses the mouse. This template is exactly the same as a 4_4 crate, but the model is ky.3do (no particular reason for it being the crate). At the same time the kyle is created, the player's model is changed to the mousebot's, which gives the effect of Kyle being left behind and the mouse being controlled by him.

> Anyway, the problem is that I can't figure out how to have the mouse explode if either the player (mouse) or the kyle object are damaged. I've tried some stuff like creating an explosion at the player position, then teleporting the player to the kyle position, resetting the player model, and then destroying the kyle dummy, but nothing at all works. Here's the functional bit, without anything to do with damage. I used the redkey item for the mine, for no particular reason. You may notice that the doll template is walkplayer, not the crate, I know and have been using the crate in the full cog (which has loads of bugs). Anyway, if you fire at walkplayer, the game crashes. r-key.3do is mb.3do under a different name.

Humm why don`t you add the message damaged and use something like

flex health

damaged:
health=GetThingHealth(what_ever_thing);
If (health > 50) etc.......

> symbols

> sound dropsound=mousebot2.wav
> thing player
> template doll=walkplayer
> model newplayer=r-key.3do
> message activated

> end

> # ========================================================================================

> code

> activated:
> player = GetSourceRef();
> health = GetThingHealth(player);
> if(GetInv(player, 46) < 1.0)
> {
> Return;
> }
> if(GetThingModel(player) == newplayer)
> {
> Return;
> }
> PlaySoundLocal(dropsound, 1.0, 0.0, 0 );
> CreateThing(doll, player);
> SetThingModel(GetLocalPlayerThing(), newplayer);
> ChangeInv(player, 46, -1);
> SetTimerEx(0.2, 1, player, 0);
> Return;
>
> end

>
> Please help!! I've been going at this one for a few days now, but haven't been able to figure anything out. :(




Follow Ups:



Post a Followup

Name:
E-Mail:
Subject:
Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]