Teleportation between two units and not villages
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
- zengetsu88
- Posts: 72
- Joined: March 29th, 2010, 7:25 pm
- Location: This Universe
Teleportation between two units and not villages
Explanation of what I am aiming to do:
Have two units of one type... lets designate them as transporters
I have another unit named bob.
I want to click on bob and have the option to teleport him from an adjacent space at transporter one to an adjacent space at transporter two. (it should look just like teleport)
Is this possible with dummy abilities and events or is it even possible to begin with?
If so how?
Have two units of one type... lets designate them as transporters
I have another unit named bob.
I want to click on bob and have the option to teleport him from an adjacent space at transporter one to an adjacent space at transporter two. (it should look just like teleport)
Is this possible with dummy abilities and events or is it even possible to begin with?
If so how?
my logic is sound
Re: Teleportation between two units and not villages
quite easy to do
search how to use [set_menu_item] and then using a properly constructed [teleport] clause in the command, even pointed at the other teleport unit not near it will do the job of teleporting to the first free spot next to the unit
it might actually be possible to do it without right clicking - just the same way you teleport between villages
search how to use [set_menu_item] and then using a properly constructed [teleport] clause in the command, even pointed at the other teleport unit not near it will do the job of teleporting to the first free spot next to the unit
it might actually be possible to do it without right clicking - just the same way you teleport between villages
Like cats? I've made a whole faction of them to kick ass with!
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
- zengetsu88
- Posts: 72
- Joined: March 29th, 2010, 7:25 pm
- Location: This Universe
Re: Teleportation between two units and not villages
I know all about the set menu item thing...
my goal is to do the second thing you said... I want to teleport a unit without right clicking...
how?
my goal is to do the second thing you said... I want to teleport a unit without right clicking...
how?
my logic is sound
Re: Teleportation between two units and not villages
You want a select event. That is,zengetsu88 wrote:I know all about the set menu item thing...
my goal is to do the second thing you said... I want to teleport a unit without right clicking...
how?
Code: Select all
[event]
name=select
...
"What do you mean, "a dwarvish dragonguard with marksman is overpowered"?"
Story of a Drake Outcast | The Nonsense Era
Played HttT-Underground Channels? Thought it was rubbish? Help us develop it here!
Story of a Drake Outcast | The Nonsense Era
Played HttT-Underground Channels? Thought it was rubbish? Help us develop it here!
Re: Teleportation between two units and not villages
I had a different idea, but it turned out the teleport ability is less versatile than I thought it to be.
Is it for a campaign or something multiplayer? if mp then select events might not be a good idea
Is it for a campaign or something multiplayer? if mp then select events might not be a good idea
Like cats? I've made a whole faction of them to kick ass with!
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
- zengetsu88
- Posts: 72
- Joined: March 29th, 2010, 7:25 pm
- Location: This Universe
Re: Teleportation between two units and not villages
Its gonna be for multiplayer...
I wanted to stick it in the eras file but if i have to i could stick it in the unit file.
I thought about select already and I wasn't sure because even if I use select how do I guarantee that the teleport graphics will show up. Also I only want them to show up if there were two or more of the teleportation units available.
I wanted to stick it in the eras file but if i have to i could stick it in the unit file.
I thought about select already and I wasn't sure because even if I use select how do I guarantee that the teleport graphics will show up. Also I only want them to show up if there were two or more of the teleportation units available.
my logic is sound
Re: Teleportation between two units and not villages
select has the problem of not showing to other players, so stuffing anything significant into it will risk you some OOS fun, keep that in mind
Like cats? I've made a whole faction of them to kick ass with!
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Re: Teleportation between two units and not villages
You can make it work so that you select the unit to be transported, and then right-click on the destination and select your custom menu option. You can do whatever you need to do in a select event as long as you have needs_select=yes in your [set_menu_item]; just remember that only the latest select event will trigger on the other clients.
- zengetsu88
- Posts: 72
- Joined: March 29th, 2010, 7:25 pm
- Location: This Universe
Re: Teleportation between two units and not villages
I figured I could do something like that but once again I want to try and and make this as close to the already made teleport ability...zookeeper wrote:You can make it work so that you select the unit to be transported, and then right-click on the destination and select your custom menu option. You can do whatever you need to do in a select event as long as you have needs_select=yes in your [set_menu_item]; just remember that only the latest select event will trigger on the other clients.
I am pretty sure its possible but how...
I like the input though, I hadn't thought of a nested event yet.
Thanks for the input so far!
my logic is sound
Re: Teleportation between two units and not villages
If you are using the newest 1.9.x version, the [tunnel] tag may be useful instead. This way you don't need any events or right-click-menus, you simply can move your unit from source to target, and it uses one MP to tunnel there.
I think it would look like this (inside an event triggering some time before you need it, e.g. on the first recruit or recall event of one of the teleporters):
I think this allows anyone teleporting from an allied teleporter to any teleporter - I don't know how to limit the target teleporter being only allied. One could create one tunnel for each side and then filter for the side number here, but this would not allow using allied teleporters as a target, only those of the own side.
Ideas, anyone?
I think it would look like this (inside an event triggering some time before you need it, e.g. on the first recruit or recall event of one of the teleporters):
Code: Select all
[tunnel]
[source]
[filter]
[filter_adjacent]
is_enemy=no
type=teleporter
[/filter_adjacent]
[/filter]
[/source]
[target]
[filter_adjacent_location]
[filter]
type=teleporter
[filter]
[/filter_adjacent_location]
[/target]
[/tunnel]
Ideas, anyone?