Mega Man 8-bit Deathmatch > Help & Editing

Help making Teleporters exclusive to gamemodes

(1/1)

Charbomber:
Okay, I feel a little embarrassed that I didn't see this part of the forums at first before asking my question beforehand. Anyways:

I want to make a teleporter in my map that connects the leftmost part of it to my rightmost part of the map, the issue being that in gamemodes like CTF, I want the flags on the leftmost and rightmost parts. That being said, I hope to exclude this teleporter from working and instead make a noise signifying that you can't teleport in CTF, which I'm pretty sure is possible with scripting, I just don't know how to do that with MM8BDM. Can I get some help?

Russel:
First off, a 2-way teleporter in 8BDM makes use of thing type 10562, Teleport Entrance.
If you give this actor a Tag under the Action tab, then it can be manipulated and removed from ACS.

With the function GetCVar, you can check the current gamemode.
Finally, you'd want to remove the actor with Thing_Remove.

So, if you put them together, you get the following:

--- Code: ---if(GetCVar("ctf")) {
    Thing_Remove(10);
}

--- End code ---

This example assumes you set the tag to 10. You can technically set the tag to anything you want, but you need to make sure the tag placed on the teleport entrance and the one passed into the function here.
You will need to give a tag to both teleport entrances in order for this to remove the teleporters on both sides of the map.

Navigation

[0] Message Index

Go to full version