Going crazy help needed !
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.
Going crazy help needed !
So i try to make a terrain become a "Portal"
so that i can place my "Portals" directly in map editor
The terrains are done So now all I've got to do is get the teleport code to work.
Needless to say, help is needed!
so that i can place my "Portals" directly in map editor
The terrains are done So now all I've got to do is get the teleport code to work.
Code: Select all
#define TELE_TERRAIN_ON
[event]
name=moveto
first_time_only=no
[filter_location]
terrain=^Otaf
[/filter_location]
[teleport]
[filter_location]
terrain=^Otaf
[/filter_location]
terrain=^Otat
[/teleport]
[redraw]
[/redraw]
[/event]
#enddef
Flyro
Ultimate campaign http://forums.wesnoth.org/viewtopic.php ... 87#p482987
Ultimate campaign http://forums.wesnoth.org/viewtopic.php ... 87#p482987
Re: Going crazy help needed !
how did you come up with the syntax you've used for [teleport]:
http://wiki.wesnoth.org/DirectActionsWML#.5Bteleport.5D
if you're using 1.9(.5?) you could use [tunnel]:
http://wiki.wesnoth.org/DirectActionsWML#.5Btunnel.5D
http://wiki.wesnoth.org/DirectActionsWML#.5Bteleport.5D
if you're using 1.9(.5?) you could use [tunnel]:
http://wiki.wesnoth.org/DirectActionsWML#.5Btunnel.5D
Re: Going crazy help needed !
Still cant fix it on my own!Max wrote:how did you come up with the syntax you've used for [teleport]:
http://wiki.wesnoth.org/DirectActionsWML#.5Bteleport.5D
if you're using 1.9(.5?) you could use [tunnel]:
http://wiki.wesnoth.org/DirectActionsWML#.5Btunnel.5D
I've used teleport before, but I've got tired of writing hexes.
Now I'm trying to make a specific terrain to be the "filter" and another specific terrain to be the "goto"!
Like the Silvermage's "teleport ability" but make it work for all units (not an ability) and make it work with my terrain instead of houses.
Hope its possible!
Flyro
Ultimate campaign http://forums.wesnoth.org/viewtopic.php ... 87#p482987
Ultimate campaign http://forums.wesnoth.org/viewtopic.php ... 87#p482987
Re: Going crazy help needed !
The wiki tells you exactly how [event] and [teleport] work and your only problem seems to be that you're ignoring that.
Re: Going crazy help needed !
Teleporting the very way a silver mage does is not possible yet, unless you're using the newest svn version (not sure actually - is [tunnel] already on svn?). I assume that you're using 1.8 or 1.9.4 (or lower) though, so you have to limit yourself to writing hexes for now.
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: Going crazy help needed !
KK
Thank you anyway guys!
Wait a minute isn't there a way to get a specific terrains cords?
And define them as "teleport cords"
or make them a variable or something like that?
that way i could just type my code like this
seems possible to me:P
I'm running 1.9.4 BTW
--------------------------------------------------------------
Also every terrain has an unique ID couldn't that be used in order to automaticly get the hexes?
Thank you anyway guys!
Wait a minute isn't there a way to get a specific terrains cords?
And define them as "teleport cords"
or make them a variable or something like that?
that way i could just type my code like this
Code: Select all
[event]
name=moveto
first_time_only=no
[filter_location]
terrain=^Otaf
[/filter_location]
[teleport]
[filter]
x=$x
y=$y
[/filter]
x=$teleport x
y=$teleport y
[/teleport]
[redraw]
[/redraw]
[/event]
I'm running 1.9.4 BTW
--------------------------------------------------------------
Also every terrain has an unique ID couldn't that be used in order to automaticly get the hexes?
Flyro
Ultimate campaign http://forums.wesnoth.org/viewtopic.php ... 87#p482987
Ultimate campaign http://forums.wesnoth.org/viewtopic.php ... 87#p482987
Re: Going crazy help needed !
again - read the documentation:
http://wiki.wesnoth.org/EventWML
there's no [filter_location] on this level. you could add one inside [filter].
if you're looking for something similar to the silver mage you can have a look at [tunnel]. it's available in 1.9.5 (not announced yet, but windows build can already be downloaded at sourceforge).
http://wiki.wesnoth.org/EventWML
there's no [filter_location] on this level. you could add one inside [filter].
if you're looking for something similar to the silver mage you can have a look at [tunnel]. it's available in 1.9.5 (not announced yet, but windows build can already be downloaded at sourceforge).
Re: Going crazy help needed !
Ive read it still it makes no sense to me -.- Perhaps you could write an example for me ??Max wrote:again - read the documentation:
http://wiki.wesnoth.org/EventWML
there's no [filter_location] on this level. you could add one inside [filter].
if you're looking for something similar to the silver mage you can have a look at [tunnel]. it's available in 1.9.5 (not announced yet, but windows build can already be downloaded at sourceforge).
Flyro
Ultimate campaign http://forums.wesnoth.org/viewtopic.php ... 87#p482987
Ultimate campaign http://forums.wesnoth.org/viewtopic.php ... 87#p482987
Re: Going crazy help needed !
I don't even know what you're trying to do exactly. If you use a moveto event then that only makes stuff happen when a unit steps on a particular hex. In your case, you're seemingly trying to make each unit which steps on a ^Otaf hex to be teleported... somewhere. I don't know where. So maybe start by describing exactly what you want to happen.
If you want something like Silver Mage's teleport then your approach is completely wrong and the only way to do it is using the [tunnel] tag as already mentioned.
If you want something like Silver Mage's teleport then your approach is completely wrong and the only way to do it is using the [tunnel] tag as already mentioned.
Re: Going crazy help needed !
Ok i got to terrains one sender (^Otaf) and one receiver(^Otat).zookeeper wrote:I don't even know what you're trying to do exactly. If you use a moveto event then that only makes stuff happen when a unit steps on a particular hex. In your case, you're seemingly trying to make each unit which steps on a ^Otaf hex to be teleported... somewhere. I don't know where. So maybe start by describing exactly what you want to happen.
If you want something like Silver Mage's teleport then your approach is completely wrong and the only way to do it is using the [tunnel] tag as already mentioned.
What i want to do is making all units that steps on the sender(^Otaf) to be teleported to the receiver (^Otat).
I hope the explanation is understandable.
Code: Select all
#define ?????
[filter]
[filter_location]
terrain=^Otaf
[/filter_location]
[/filter]
variable=teleportxy
#enddef
[event]
name=moveto
first_time_only=no
[filter]
[filter_location]
terrain=^Otaf
[/filter_location]
[/filter]
[teleport]
[filter]
x=$x
y=$y
[/filter]
x,y=$teleportxy
[/teleport]
[redraw]
[/redraw]
[/event]
Flyro
Ultimate campaign http://forums.wesnoth.org/viewtopic.php ... 87#p482987
Ultimate campaign http://forums.wesnoth.org/viewtopic.php ... 87#p482987
Re: Going crazy help needed !
you've got different portals. each has it's own terrain. you place exactly two of each in the editor and you'd like to make use of them in your scenarios without specifying the exact location. right?
- use wildcards (http://wiki.wesnoth.org/FilterWML#Filtering_Terrains) for your filter to filter all portal terrain
- use [store_locations] to get the current terrain.
- use store_locations again with the current terrain + [not]x,y (your current position).
this way you get the corresponding portal location.
- use wildcards (http://wiki.wesnoth.org/FilterWML#Filtering_Terrains) for your filter to filter all portal terrain
- use [store_locations] to get the current terrain.
- use store_locations again with the current terrain + [not]x,y (your current position).
this way you get the corresponding portal location.
Re: Going crazy help needed !
Tank you thats probably the answer i was looking for.Max wrote:you've got different portals. each has it's own terrain. you place exactly two of each in the editor and you'd like to make use of them in your scenarios without specifying the exact location. right?
- use wildcards (http://wiki.wesnoth.org/FilterWML#Filtering_Terrains) for your filter to filter all portal terrain
- use [store_locations] to get the current terrain.
- use store_locations again with the current terrain + [not]x,y (your current position).
this way you get the corresponding portal location.
Could you write an example for me?
SOLVED click url below
http://forums.wesnoth.org/viewtopic.php?f=21&t=33470
Flyro
Ultimate campaign http://forums.wesnoth.org/viewtopic.php ... 87#p482987
Ultimate campaign http://forums.wesnoth.org/viewtopic.php ... 87#p482987