Page 1 of 1

Image Cursor ActionPoint not responding

PostPosted: Fri Dec 27, 2013 3:19 am
by reneuend
{update} I found a work-around, but it doesn't fix the issue. I changed the canvas size of my image cursor to move the actionpoints. Basically, I moved the actionpoint on the image by manipulating the image.

I am using version 4.7.1 and I am unable to get the ActionPoint commands to respond. My Y actionpoint is good, but the X is off to the right. When I changed the value nothing happens. Any ideas? Is this broken?

Code: Select all
RotationAngle = 0

Component("KeyGuard").Object.ProhibitRotation = 1
RenderBitMapCursor "riflescope.jpg","riflescopemask.jpg"
Component("KeyGuard").Object.ActionPointX = 0
Component("KeyGuard").Object.ActionPointY = 700

Component("KeyGuard").Object.RenderLimitX1 = -950
Component("KeyGuard").Object.RenderLimitY1 = -900
Component("KeyGuard").Object.RenderLimitX2 = 0
Component("KeyGuard").Object.RenderLimitY2 = -100

Re: Image Cursor ActionPoint not responding

PostPosted: Wed Jan 01, 2014 9:56 am
by ShadowHunter
Hi Reneuend,

This is the snippet that uses the properties:

Code: Select all
If ActionPointXI = 0 And ActionPointYI = 0 Then
        If lRadians = 0 Then
            XPosCur = xPos - PicCur.Width / 2
            YPOSCur = yPos - PicCur.Height / 2
            XPosCur = xPos - PicCurBuffer.Width / 2
            YPOSCur = yPos - PicCurBuffer.Height / 2
        End If
            XPosCur = xPos - ActionPointXI
            YPOSCur = yPos - ActionPointYI
    End If
    'New for 4.1.1 = RenderLimitX and RenderLimitY
    'Only render when the mouse is in a certain, square area
    If RenderLimitX1I <> 0 Or RenderLimitX2I <> 0 Then
        If XPosCur + ActionPointXI < RenderLimitX1I Then XPosCur = RenderLimitX1I - ActionPointXI
        If XPosCur + ActionPointXI > RenderLimitX2I Then XPosCur = RenderLimitX2I - ActionPointXI
    End If
    If RenderLimitY1I <> 0 Or RenderLimitY2I <> 0 Then
        If YPOSCur + ActionPointYI < RenderLimitY1I Then YPOSCur = RenderLimitY1I - ActionPointYI
        If YPOSCur + ActionPointYI > RenderLimitY2I Then YPOSCur = RenderLimitY2I - ActionPointYI
    End If

I did not check all in detail again (it has been a long time since I wrote this), it could have something to do with the more recent added render limits... does changing some values in that area do anything that can help?

With best regards,


Re: Image Cursor ActionPoint not responding

PostPosted: Wed Jan 01, 2014 10:06 pm
by reneuend
One of the possible issues is that I'm not using the latest version because I started this not realizing what version I had loaded. I found ways around the issue. I'll have to test the latest version.

IMO, it should be integrated in the next release of AM (if there is one). I have a game coming out soon that will show different uses.

When the image cursor first came out, I built a sample game to show how to use the mouse wheel as an inventory. I want to improve on this and have a custom inventory and allow the player to carry "x" number of items that they can access with the mouse wheel. That's why its important the actionpoint works. I'll test and see what I can do...maybe I need the latest version?