April 23, 2024, 12:05:05 PM
Welcome,
Guest
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
IRC channel - server:
waelisch.de
channel:
#wme
(
read more
)
Home
Help
Search
Calendar
Login
Register
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Dynamically Create Region
« previous
next »
Pages: [
1
]
Print
Author
Topic: Dynamically Create Region (Read 2270 times)
0 Members and 1 Guest are viewing this topic.
serdar
Lurker
Karma: 0
Offline
Gender:
Posts: 11
Dynamically Create Region
«
on:
September 01, 2010, 02:32:31 PM »
hi,
I have asked a question before about this topic on forum.
http://forum.dead-code.org/index.php?topic=4426
but i have a different problem now. I created the regions dynamically but some places in my region are not catching mouse...
Am I setting wrong points...
You can download sample project here
serdarb.com/RegionProblem.zip
Logged
--
serdarb.com
twitter.com/hserdarb
Mnemonic
WME developer
Administrator
Addicted to WME forum
Karma: 41
Offline
Gender:
Posts: 5683
Re: Dynamically Create Region
«
Reply #1 on:
September 01, 2010, 02:49:26 PM »
The order of the points matters. This way you created kind of twisted regions, not rectangles (try painting the points on paper and connect them with lines).
This should work as expected (notice the points are added in clockwise order):
Code: WME Script
zLeftRegion.
AddPoint
(
0
,
0
)
;
zLeftRegion.
AddPoint
(
170
,
0
)
;
zLeftRegion.
AddPoint
(
170
,
Scene
.
Height
)
;
zLeftRegion.
AddPoint
(
0
,
Scene
.
Height
)
;
Code: WME Script
zRightRegion.
AddPoint
(
1100
,
0
)
;
zRightRegion.
AddPoint
(
1280
,
0
)
;
zRightRegion.
AddPoint
(
1280
,
Scene
.
Height
)
;
zRightRegion.
AddPoint
(
1100
,
Scene
.
Height
)
;
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum.
Print
Pages: [
1
]
« previous
next »
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Dynamically Create Region