dMZX Forums: Overlay Detection(More than one Way?) - dMZX Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Overlay Detection(More than one Way?)

#1 User is offline   cwags55 

  • Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 14-October 00

Posted 11 February 2007 - 06:49 PM

So I am stuck, is there more than one way to detect an overlay?

This is the current code I am using:

set overlay_x to 1
set overlay_y to 5
if "(('overlay_char'=132)a('overlay_color'=4))" = 1 then "go"


Which works fine, but I need a second detection method for a seperate function.

Any thoughts?
cwags55
Uniquesoft
0

#2 User is offline   LogiCow 

  • Holiday cow
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,671
  • Joined: 18-July 02
  • Gender:Male
  • Location:Quebec

Posted 11 February 2007 - 07:39 PM

copy overlay block at "x" "y" for 1 by 1 to "#0" "#0"
if "(('vch0,0'=132)a('vco0,0'=4))" = 1 then "go"
0

#3 User is offline   cwags55 

  • Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 14-October 00

Posted 11 February 2007 - 08:37 PM

I didn't even think to use the vlayer for detection. It works however, it only works once. Is there a way to clear that slot in the vlayer so that it works multiple times?
cwags55
Uniquesoft
0

#4 User is offline   cwags55 

  • Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 14-October 00

Posted 11 February 2007 - 08:50 PM

Here is my code. It works once, then breaks everything.


copy overlay block "('spr2_x' -1)" "spr2_x" for 1 by 1 "#0" "#0"
if "(('vch0,0'=&backchar1&)a('vco0,0'=&backcolor1&))" = 1 then "go"
if "(('vch0,0'=&backchar2&)a('vco0,0'=&backcolor2&))" = 1 then "go"
if "(('vch0,0'=&backchar3&)a('vco0,0'=&backcolor3&))" = 1 then "go"
if "(('vch0,0'=&backchar4&)a('vco0,0'=&backcolor4&))" = 1 then "go"
if "(('vch0,0'=&backchar5&)a('vco0,0'=&backcolor5&))" = 1 then "go"
if "(('vch0,0'=&backchar6&)a('vco0,0'=&backcolor6&))" = 1 then "go"
if "(('vch0,0'=&backchar7&)a('vco0,0'=&backcolor7&))" = 1 then "go"


I can't figure out why it only works once.

This post has been edited by cwags55: 11 February 2007 - 08:53 PM

cwags55
Uniquesoft
0

#5 User is offline   T-Bone 

  • Wastelander
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,487
  • Joined: 16-August 02
  • Gender:Male
  • Location:Canada

Posted 11 February 2007 - 10:23 PM

I'm having a lot of problems with the vlayer lately which has halted me from working on most of my big projects.
0

#6 User is offline   cwags55 

  • Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 14-October 00

Posted 11 February 2007 - 10:46 PM

Yeah, the vlayer has forced me to take some different coding routes.

Speaking of which, does anyone know if there is a way to detect the overlay generally not specifically, i.e.

the equivalent would be

if c?? overlay p?? at x y "go"

rather than detecting a specific char and color. This might by pass my overlay detection vlayer issues.
cwags55
Uniquesoft
0

#7 User is offline   Goshi 

  • I'm dreadful of DRAGON.
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 4,146
  • Joined: 23-April 01
  • Gender:Male
  • Location:Hihoukan

Posted 11 February 2007 - 11:41 PM

There was a counter for that. Like overlay color or something. Looking it up under counters in the help file.
0

#8 User is offline   cwags55 

  • Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 14-October 00

Posted 12 February 2007 - 03:31 AM

I found out how to correct the problem.

Because I was copying multiple overlays to the vlayer, I just had to copy a blank block to the same slot. In essence, I guess it cleared the slot. It might just be a quick rig but it works. I don't know if this helps you any T-Bone.
cwags55
Uniquesoft
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users