Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support
If PlayerOn = True AND If PlayerLeft = HotspotLeft AND If Playertop = HotspotTop then Hotspot(2).enabled = FALSE
Netjera wrote:
- Code: Select all
If PlayerOn = True AND If PlayerLeft = HotspotLeft AND If Playertop = HotspotTop then Hotspot(2).enabled = FALSE
If PlayerOn = TRUE AND PlayerLeft = HotspotLeft AND Playertop = HotspotTop Then
Hotspot(2).Enabled = FALSE
End If
reneuend wrote:Netjera wrote:
- Code: Select all
If PlayerOn = True AND If PlayerLeft = HotspotLeft AND If Playertop = HotspotTop then Hotspot(2).enabled = FALSE
Too many IFs!
Solution
- Code: Select all
If PlayerOn = TRUE AND PlayerLeft = HotspotLeft AND Playertop = HotspotTop Then
Hotspot(2).Enabled = FALSE
End If
PlayerOn = Component("ThirdPersonV10").Visible
PlayerLeft = Component("ThirdPersonV10").Left
PlayerTop = Component("ThirdPersonV10").Top
Basically, stuff needs to drop on the player, and then disappear when it hits him
I need the 3rd person plugin because the player has to be able to move back and forth across the screen to catch stuff. I don't know of any other way to make him move?
mercedes wrote:HI there..
I guess it depends on whether or not, u are moving him normally--[with clicking] If u are moving him normally..Then u make hotspots on the ground, and in those hotspots u use coordinates..the sprite then moves to it..once the player clicks them.
However if u are using hotspots and u want the sprite to take action and move without the user clicking any hotspots...then i would suggest only using the pictures and using the other plugin--xtreme- to move the sprite as a normal hotspot with a picture of a sprite in it..
Does that make better sense..? As far as i know the sprite can only be moved with the user clicking in places to move him too..
There may be a way with scripting..but I don't know of it..Not sure if anyone here has done that either..?..Could be wrong..
I already am using Lyberodoggy's (sp?) plugin to move the hotspots that represent the items "falling". They work great. What I want them to do is to be disabled when the player "catches" them. So I've been trying to check to see when they occupy the same position. Using "GetMouseClick" doesn't work, since the player isn't going to a spot, he's moving back and forth across the screen.
If I used keyboard controls, think of using the left and right arrow to move back and forth under stuff. Sort of like an old-fashioned space invaders game.
mercedes wrote:If I used keyboard controls, think of using the left and right arrow to move back and forth under stuff. Sort of like an old-fashioned space invaders game.
Sorry, that's how KG got involved..I misunderstood it..I thought u wanted to do that with the keyboard..
mercedes wrote:I don't know if this will help, but its helped me in the past with codes..
http://www.adventuremaker.com/help/vbscript_reference.htm
http://www.adventuremaker.com/help/vbscript_techniques.htm
mercedes wrote:Did u try..;
If GetClickPositionX < 30 and GetClickPositionY <20 Then
Hotspot(1).enabled = False
End If
mercedes wrote:Best guess...You may have to put "Action" in front of it..
I would put that in the hotspots u click to move the man around--The one that he moves to to catch the item..?
How do I get it to move when I click again? So it moves on first click, stops, and then when I click again, it moves again. In most cases, this might be in either direction, too.
MyVariable = MyVariable - 1
If MyVariable = -1 Then
Hotspot(3).move 120*15,45*15
End If
If MyVariable = -2 Then
Hotspot(3).move 25*15,35*15
End If
MyVariable = MyVariable - 1
If MyVariable = -1 Then Hotspot(3).move 120*15,45*15
If MyVariable = -2 Then Hotspot(3).move 25*15,35*15
juhuwoorps wrote:I not sure what you searching for.
Is it something like this:
http://www.wuttiggames.com/downloads/slidertest.exe
click left or right besides the hotspot
set MyHotspot = CreateObject("AM.Hotspot")
Other Functions
Function: CreateObject
Description: Creates an object of a specified type
CreateObject Function
Creates and returns a reference to an Automation object.
- Code: Select all
CreateObject(servername.typename [, location])
Arguments:
servername
Required. The name of the application providing the object.
typename
Required. The type or class of the object to create.
location
Optional. The name of the network server where the object is to be created.
Remarks
Automation servers provide at least one type of object. For example, a word-processing application may provide an application object, a document object, and a toolbar object.
To create an Automation object, assign the object returned by CreateObject to an object variable:
- Code: Select all
Dim ExcelSheet
Set ExcelSheet = CreateObject("Excel.Sheet")
reneuend wrote:I've always managed this slightly differently. Instead of moving the hotspot, I just move the image from one hotspot to another. It's a bit more difficult to manage the code, but this is how I've always coded layers of hotspots.
reneuend wrote:What you need is an example!
Unless someone is else can show you how to manipulate the z order of the hotspots...and I'm sure it can be done, I'll show you an example of how I would do it....lets give it 24 hours for someone else's reply....Lyberodoggy? You listening?
Sub loadhspicture(index,filename)
loadapicture Hotspot(index), GetEncryptedFileName(filename)
hotspot(index).tag=filename
end sub
i=GetHotspotNumber
If i>1 Then
picture=Hotspot(i-1).tag
LoadAPicture Hotspot(i-1), getencryptedfilename(Hotspot(i).tag)
LoadAPicture Hotspot(i), getencryptedfilename(picture)
End If
dim selected(5)
dim counter
dim numbers(45)
for i=0 to 44
numbers(i)=i+1
next
do while counter<5
sel=false
randomize
rand=int(rnd*45)+1
for i=0 to 4
if selected(i)=rand then
sel=true
end if
next
if sel=false then
selected(counter)=rand
'numbers(rand-1)=0
counter=counter+1
end if
loop
for i=0 to 44
if i mod 5 = 0 then
text=text+vbcrlf
end if
text=text+cstr(numbers(i))+vbtab
next
text=text+vbcrlf+"Selected numbers: "
for i=0 to 4
text=text+cstr(selected(i))+", "
next
msgbox text,vbokonly,"Joker"
Lyberodoggy wrote:currently you can't manipulate a Hotspot like a normal VbImagebox. But even if you could, VB6 doesn't let you set the zorder property during runtime. So the only way to bypass the problem with the Z order is to do as reneuend recommended, moving the images to a hotspot with a lesser index value.
Return to Adventure Maker General Discussion
Users browsing this forum: No registered users and 0 guests