Net's Syntax Questions

This forum is meant for posting anything related to Adventure Maker that doesn't fit in the other forums.Please post technical questions in the Technical Support Forum!

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Postby Netjera » Wed Feb 10, 2010 7:59 pm

Lyberodoggy wrote:in order to be backwards compatible, my plugin uses the same internal name even though the filename changes. You should remove the oldest plugin (2.0) from the plugins folder, or it will seem as a duplicate of the same internal plugin.


Okay, that's what I did.

There's no need to fill in the plugin tab per each card, in this case, is there? The code that's been written does the actual moving right?
A woman on a mission - a budding artist looking for a place to take root, a builder looking for the right community - I'm looking for a home.
User avatar
Netjera
Frequent Poster
 
Posts: 127
Joined: Sun Jan 24, 2010 8:48 am
Location: United States

Postby Lyberodoggy » Wed Feb 10, 2010 9:29 pm

Should be so.
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby Netjera » Sat Feb 13, 2010 7:25 am

I got it working, but it's not working *well* for some reason.

First, it's not moving the cards, they're just "appearing" in their new locations.

Second, I've used a systematic way of incrementing the card location, so that there are 20 pixels on either side of the layout, and 18 between every card. But for some reason, some of the cards deal perfectly and others are "off". There is no gap between the first and second card dealt. Starting with the last card in the third row, the card is shifted in a few pixels, and every row deals with the cards in that column in the same shifted location. This shouldn't be happening, since I've used a formula for the card location, and it's the same for every card except the first in every row.

Third, I have to figure out some way to get the cards to stop changing locations after the deal is done, lol. If I run the deal with the cards face-up for reference, the last card dealt shows every different face that's left in the deck until it comes to the "hotspot" card. X-D

I'm beginning to get really annoyed. I got it working and it's not quite right! lol
A woman on a mission - a budding artist looking for a place to take root, a builder looking for the right community - I'm looking for a home.
User avatar
Netjera
Frequent Poster
 
Posts: 127
Joined: Sun Jan 24, 2010 8:48 am
Location: United States

Postby Netjera » Sun Feb 14, 2010 9:31 pm

Okay, I think I'm missing something important here. Can anybody explain to me, please, what order the various sections of the engine are firing in?

I'm assuming anything loaded at "Frame Start" are loading before anything loaded "On Hotspot Click".

However, when you click the hotspot, does the VBScript run first, or the plugins? Or are they simultaneously fired?

I've got a really funny error with card placement, and after spending four days fighting with it, I've come to the possible conclusion that it's a logic error, occurring because things are not firing in the order I think they're firing. :(
A woman on a mission - a budding artist looking for a place to take root, a builder looking for the right community - I'm looking for a home.
User avatar
Netjera
Frequent Poster
 
Posts: 127
Joined: Sun Jan 24, 2010 8:48 am
Location: United States

Postby Lyberodoggy » Sun Feb 14, 2010 11:00 pm

Netjera wrote:Okay, I think I'm missing something important here. Can anybody explain to me, please, what order the various sections of the engine are firing in?

I'm assuming anything loaded at "Frame Start" are loading before anything loaded "On Hotspot Click".

However, when you click the hotspot, does the VBScript run first, or the plugins? Or are they simultaneously fired?

I've got a really funny error with card placement, and after spending four days fighting with it, I've come to the possible conclusion that it's a logic error, occurring because things are not firing in the order I think they're firing. :(


I think that plugins' codes have a higher priority. However one thing's for sure: they don't trigger simultaneously.

If you have problems with the execution priorities, just use time events ;)
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby Netjera » Mon Feb 15, 2010 12:24 am

This is not reacting the way I would expect then.

I've set the code up to use strict coordinates:

Column 1 (1 card): x: 20, y:100
Column 2 (2 cards): x: 108, y:100/115
Column 3 (3 cards): x: 196, y:100/115/130
Column 4 (4 cards): x: 284, y:100/115/130/145
Column 5 (5 cards): x: 372, y:100/115/130/145/160
Column 6 (6 cards): x: 460, y:100/115/130/145/160/175
Column 7 (7 cards): x: 548, y:100/115/130/145/160/175/190

If the card is card 1, it sets the card location to 20, 100, absolutely.
For the 2nd - 7th cards, the card locations are set to xdp (20) + 88. So that they're dealt in a row, across, 88 apart (70 card width + 18 pixel space).

If the card is card 8, it sets the card location to 108, 115 absolutely.
For the 9th - 14th cards, the xdp is again incremented by 88.

If the card is card 15, it sets the card location to 196, 130 absolutely, and every card after on that row is incremented by 88.

This continues with each row being laid. The first card is set absolutely, the rest of them are spaced 88 apart on the x and located at the same y.

What I don't understand, is how the code is reacting.

As you can see, there is no space between the first and second cards of row 1. Because the first card on row 2 is perfectly aligned with that on row 1, I'm thinking it's the very first card which is not dealing in the proper location. Further, spacing between the cards does not look even. It should be 18 pixels across. In some areas it looks less.

Then, at the end of row 3, you can see how the last cards are pushed in, and then the same thing happens in a column within the last couple of rows.

Since I believe my math to be sound, I can only assume there's a logic error. However, my logic also appears to be technically correct BASED ON WHAT I KNOW.

I was concerned that loading was occurring in a different order, and that the load was causing my logic to be incorrect. However, when I placed message boxes in the VBScript and Plugin tabs, it ran the message boxes in the VBScript tab to completion, before running the one in the plugin tab. This appears to be counter to what you've said however, and to what I've observed.

I've run a whole series of tests by changing the starting xdp on frame load. And doing so is causing unpredictable results for some reason.

I'm at a complete loss, and very frustrated.

If the idx = 0 on frame load, then it shouldn't move a hotspot at all, since there's no hotspot 0, correct?

Yet, somehow, hotspot 1 is showing up at the load location, even though if the hotspot idx were 1, it should be incremented to 108. Further, if I change the xdp to 0 on frame load, which should be incremented by the hotspot click, the card loads at x:0.

Image
A woman on a mission - a budding artist looking for a place to take root, a builder looking for the right community - I'm looking for a home.
User avatar
Netjera
Frequent Poster
 
Posts: 127
Joined: Sun Jan 24, 2010 8:48 am
Location: United States

Previous

Return to Adventure Maker General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron