Jump to content
billyfromhill

Run on land and swim.

Recommended Posts

would require a script to add the command back, so you'd need a script to trigger removing it via button and putting back that command. look at i believe standby command in la mod for an example of adding/removing commands.

Link to comment
Share on other sites

If it were me doing it I would just make a whole new script with a button, so that you can have the guy "prepare to swim" or be a land unit... Make said button go from a swimmin dude image (like you'd see at a beach) to a walking guy when he's a land based guy (add all commands via that script he'd require) and remove the dive command from him: Borrowed from the LA Draw Weapon Script


Caller->PushActionEquipWeapon(ACTION_NEWLIST, true);
Caller->AssignCommand(CMD_SHOOTGUN);
Caller->AssignCommand(CMD_HOLSTERGUN);
Caller->RemoveCommand(CMD_DRAWGUN);
Caller->AssignCommand(CMD_ARREST2);
Caller->RemoveCommand(CMD_ARREST);

Obviously the commands for the new button would need to remove the "walking" button and place the prepare to swim button in it's place since this is the command that you need to make him swimable again, same deal but you're adding dive back and removing all other commands from the unit.

Link to comment
Share on other sites

Are you sure that would work? In order to swim in the water the unit needs the dive command. I understand what you mean by creating a script that switches the commands. That would solve the running on land issue, but the SWR guy would still have the dive command after you click the "prepare to swim" button.

It's not even as if you can remove the dive command after the SWR guy gets in the water since there is no special command to swim, just the move script.

Link to comment
Share on other sites

The switch might work, although it needs to be tested to be certain.

Remove the 'Dive' command from the diver, so it runs like every fire fighter does for default. Then create a simple command 'Prepare to dive' which does this:

- Adds 'Dive' command

- Removes 'Prepare to dive' command

- Adds 'Clear dive state' command

The last one reverts it all back to default state.

Edit: Make sure to add something to script that prevents the 'Clear dive state' command from being executed while the diver is in the water.

Link to comment
Share on other sites

It is possible that there would be two different outcomes in my eyes if the diver was switched to a normal ff again while in the water:

A. Crash to desktop.

B. He drowns.

Either way if you do not have the sense to know the diver is in the water, so pushing that button is a bad idea, in my view you deserve the fate=)

Hoppah might be correct there may be a way to prevent changing back while in the water... if that is the case then it would be problem solved... Even if there is not common sense should prevail on this one considering that if the guy is in the water you probrably want him to stay a diver.

Link to comment
Share on other sites

Thanks for all the ideas so far, but the whole point of this topic is to see if it is possible to create a unit that can run on land, swim in the water, rescue people in the water, but NOT dive to rescue people in cars or mark cars for salvage. So far it seems that this is not possible, in which case I will abandon the idea. The extra button would work if we wanted the diver to run on land, but I think the current diver is fine how it is now.

Link to comment
Share on other sites

You might be able to "hide" the dive command from the UI, but since the dive command is what makes the swimmer/diver work... you have to have it present on the person (maybe not in the UI but it has to exist on the person somehow), perhaps you can manage to hide the button through an overcomplicated script... But I am uncertain how you could go about doing that.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...