Trouble wih frame merge scores.

This forum is meant for people to share their knowledge by writing their own tutorials for Adventure Maker.

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

Trouble wih frame merge scores.

Postby Stitches » Sat Dec 14, 2013 2:49 am

Hi guys. I'm having a lil' problem with scripting and arranging my inventory or status bar or whatever you wanna call it. Basically, I have rigged a score system of different points, HP EP TOK SCI, to appear on my inventory frame. During the test, the frame works fine. A continually updated score which interacts with timed events etc. displays properly. All functions normal. However, when the game is loaded, the inventory bar is merged with all frames properly, but the scores have reverted to their original texts. I'll show pic examples. Can anyone help? Lemme know where I've gone wrong? :oops:

1st script into the frame properties of the "Inventory" frame, (the bar to be merged with all frames)
i = Action.GetMergedTextIndex
Text(1).Caption=" "+CStr(HP)
Text(2).Caption=" "+CStr(EP)
Text(3).Caption=" "+CStr(TOK)
Text(4).Caption=" "+CStr(Science)

**Don't worry about names seeming weird, it's all in order.

Then every interaction is coded correctly to correspond with what happens...
For instance, eating chicken...
HP = HP + 25
i = Action.GetMergedTextIndex
Text(1).Caption=" "+CStr(HP)

Realtime scores appear until actually playing the game.
Thanks in advance :) (again :oops: )
Attachments
h2.png
working fine on test screen
h2.png (238.3 KiB) Viewed 6982 times
http://www.youtube.com/user/MaynardStaly/videos and http://libertycap.webs.com
“With a bit of luck, his life was ruined forever. Always thinking that just behind some narrow door in all of his favorite bars, men in red woolen shirts are getting incredible kicks from things he’ll never know.”
User avatar
Stitches
Active Member
 
Posts: 71
Joined: Tue Nov 12, 2013 3:56 am
Location: UK

Re: Trouble wih frame merge scores.

Postby Stitches » Sat Dec 14, 2013 2:50 am

This pic is of the error.
Attachments
h1.jpg
h1.jpg (247 KiB) Viewed 6980 times
http://www.youtube.com/user/MaynardStaly/videos and http://libertycap.webs.com
“With a bit of luck, his life was ruined forever. Always thinking that just behind some narrow door in all of his favorite bars, men in red woolen shirts are getting incredible kicks from things he’ll never know.”
User avatar
Stitches
Active Member
 
Posts: 71
Joined: Tue Nov 12, 2013 3:56 am
Location: UK

Re: Trouble wih frame merge scores.

Postby Stitches » Sat Dec 14, 2013 3:00 am

Also feel free to comment on first preview of game artwork. :) ;) :v
http://www.youtube.com/user/MaynardStaly/videos and http://libertycap.webs.com
“With a bit of luck, his life was ruined forever. Always thinking that just behind some narrow door in all of his favorite bars, men in red woolen shirts are getting incredible kicks from things he’ll never know.”
User avatar
Stitches
Active Member
 
Posts: 71
Joined: Tue Nov 12, 2013 3:56 am
Location: UK

Re: Trouble wih frame merge scores.

Postby reneuend » Sat Dec 14, 2013 2:57 pm

I LOVE!!!!!!!!!!!!!!!!!!! your artwork! Did I express my emotion properly?

I don't use merged frames and never really understood the advantage. If you know how to program, you don't need them. Your code looks good to me, which leads me to believe the issue is with merged frames. I wish ShadowHunter or Lyberodoggy were still around, they understood how AM worked in the backend. I know how to program, but I don't have an in-depth knowledge of AM's underpinnings.

Your game looks great! I hope you get all this resolved soon. I feel your frustration.

By chance, did you read anything on merged frames in the AM documentation or on any forum threads?
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2690
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: Trouble wih frame merge scores.

Postby Vengeance66 » Sat Dec 14, 2013 3:49 pm

Nice artwork! I like it! :-)

I used Frame Merging to put the diary, map and menu button in Shadows II. I didn't have any problems at all.

Cheers.
Stay a while and listen...

Rainbow Enterainment - http://rainbowenter.com/
User avatar
Vengeance66
Administrator
 
Posts: 630
Joined: Wed Oct 13, 2010 2:17 pm
Location: Macedonia

Re: Trouble wih frame merge scores.

Postby reneuend » Sat Dec 14, 2013 4:45 pm

There is one thing I don't understand in the lines of code you display. Where do you use "i" when you get the mergedIndex? Also, when you get "i" are you moving outside it's scope? If so, "i" will reset back to its initial value of "0".

i = Action.GetMergedTextIndex
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2690
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: Trouble wih frame merge scores.

Postby Stitches » Sat Dec 14, 2013 7:21 pm

Reet. Unsure what you mean by "outside it's scope"? I just thought (i) would be replaced by the number when the code is working. Should I remove the i and it will work?I was thinking of finding a good prpgrammer to do a counter plugin. Something which you could just "add count" Then give Min and Max Value, then activation Variable... something of that format to be activated in hotspot properties Programme to update the scores in real tme on the screen. I only foun out after all that custom work that you cannot drag an item into the merged frame for use. Bummer. Had to redo my whole inventory system.

So aye, should the code be
Action.GetMergedTextIndex
Text(1).Caption=" "+CStr(HP)
Text(2).Caption=" "+CStr(EP)
Text(3).Caption=" "+CStr(TOK)
Text(4).Caption=" "+CStr(Science)

sans the i?

I read your part on using a single frame, that would solve the problem instantly, but having so much activity and hospots on the page when working would screw with my eyes too much. I'd have to space some things out. Though will try for a smaller game idea in the future (Cheers for that one)
Can you do this HP counter using a sub routine? (I'm just trying to wrap my head around those at the moment).
And thanks for the artwork buzz.
for instance something like:
Sub Health
HP = 100 0/100 (min max cvalue
http://www.youtube.com/user/MaynardStaly/videos and http://libertycap.webs.com
“With a bit of luck, his life was ruined forever. Always thinking that just behind some narrow door in all of his favorite bars, men in red woolen shirts are getting incredible kicks from things he’ll never know.”
User avatar
Stitches
Active Member
 
Posts: 71
Joined: Tue Nov 12, 2013 3:56 am
Location: UK

Re: Trouble wih frame merge scores.

Postby reneuend » Sat Dec 14, 2013 8:39 pm

Actually, with a single frame, you would reuse hotspots and just load the necessary image.
But, more importantly, lets get your scoring working. I apologize for assuming you knew what I was talking about.

You assigned "i" the MergedTextIndex but never used it. According to the AM documentation, it returns the index of the 1st text object from a merged frame. What do you have in the
1st text object?

After you assign "i", you don't use it. If it is an index for a text object then it would look like this:
Text(i).Caption=" "+CStr(HP)


What is the space used before the HP value?
Text(1).Caption=" "+CStr(HP)


As for counters, you don't need a plugin. If you want to use a subroutine, I wouldn't call it "Health" because that is too specific. It would be something like this:


NOTE: Unless you are doing something more complex, its almost not worth having a subroutine for this.

'By making the routine generic, you can reuse the routine for all your counters.

InitializeCounter(HP, 1)
UpdateCounter(HP, 25)

InitializeCounter(TOK, 1)
UpdateCounter(TOK, 10)


Code: Select all
SUB InitializeCounter(byRef counter, byVal Value)
    counter = value
END SUB


Code: Select all
SUB UpdateCounter(byRef counter, byVal Increment)
    counter = counter + Increment
END SUB



Let me know if I'm on the right track with what you are needing. The bottomline is that you assigned "i', but never used it. When you do use it, it appears that it will only give you the value for the 1st Text object: text(1). Seems very odd to me that this is the case. Merged frames are a mystery to me. I really don't understand how they are structured in the back end.

I think the reason your scores aren't being displayed is because you need to use "i" as an index in the text object: text(i).caption
But, what I don't understand is how do you assign it to other text objects if it only returns the 1st one?
I would be tempted to do the following:

Code: Select all
Text(i).Caption = "HP: " & HP & " TOK: " & TOK


The formatting on this caption would be whatever was needed in your situation.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2690
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: Trouble wih frame merge scores.

Postby Stitches » Sun Dec 15, 2013 12:23 pm

***The space " " in my code up there has been modified, there wasn't meant to be a space there as the score is displayed next to a picture related to 'health'. That was just a bimble, sorry.

Hehe. I had no idea about the index ref thing. Like I told you man, I'm a cartoonist. I got this software because it was supposed to help make a simon the sorcerer style point and click adventure with ease... though I have had to take up learning to program with it. No complaint, learning something new. But grasping VBS has taken a few nights up- and I'm a single parent... so usually knackered when I get the chance to do this :) I sill haven't grasped this. IS there a VBS dictionary somewhere I can get some references?

***
SUB InitializeCounter(byRef counter, byVal Value)
counter = value
END SUB

SUB UpdateCounter(byRef counter, byVal Increment)
counter = counter + Increment
END SUB

Do I just copy this code straight in and make a "counter" variable? I have no idea what byref and byval mean. :oops: I couldn't find anything in the language reference about them.

All I was aiming to do was a realtime updated score which is displayed on the merged frame in the displayed inventory bar. As I said, whilst the score appears fine when testing the merge frame alone, it doesn't update when the game is being played and the frame is merged. I read some bis on the merged frames but can't find anything on this.

This is what I have so far...
HP is a variable like the others but just use that example for now.

I have executed some VBS upon game startup which adds 25 to HP instantly when you play so that There is something to take from.

On inventory frame I put this in the frame properties...
i = Action.GetMergedTextIndex
Text(1).Caption=" "+CStr(HP)

On renuened's advice I removed the (i) and space...
Action.GetMergedTextIndex
Text(1).Caption=""+CStr(HP)

This now displays the initial 25 HP on the inventory frame when tested, but not when frame is merged in gameplay. It shows just "HP" (The text Object reading "HP" which is supposed to be replaced by the value.)

Then On the hotspots which affect the HP:
HP = HP -/+ X : Call it -10 for this example.

^I have a Sub called "death" Which takes the characters to a game over screen when HP <= 0 .

Death
If Hp <= 0 Then
HP = HP - 10
Else:
Message "Game Over" (It actually says something else but keep the board clean eh ;) )
End If.

This all works fine, This takes 10 health from player.

Now what I'm having problems with.

As displayed in the picture, during the gameplay, the score isn't updated on the merged frame. What code do I put where to make this simple thing happen? I read somebody else's post having similar problems, but when they solved it, they never put how! They just said "I put the code in the wrong order and it works now". I followed all steps but it just stops without giving indication of what code where and how.
http://www.youtube.com/user/MaynardStaly/videos and http://libertycap.webs.com
“With a bit of luck, his life was ruined forever. Always thinking that just behind some narrow door in all of his favorite bars, men in red woolen shirts are getting incredible kicks from things he’ll never know.”
User avatar
Stitches
Active Member
 
Posts: 71
Joined: Tue Nov 12, 2013 3:56 am
Location: UK

Re: Trouble wih frame merge scores.

Postby Stitches » Sun Dec 15, 2013 1:08 pm

Also...
HOW DO YOU END A SUB?
I have created a Sub called "Poison" which creates a timed event which slowly drains the persons health.
Sub Poison
If HP > 0 Then
HP = HP - 1
ElseIf HP <> 0 Then
Message "I don't feel so.. ugh..."
HP = 0
End If
ShowCounter
End Sub

Sub ShowCounter
text_index = Action.GetMergedTextIndex
If HP > 0 Then
Text(text_index) = HP
Else
Text(text_index) = "Dead"
Action.GoToFrame"FDS",1,1
End If
End Sub

This is fine.When it is activated via a hotspot (by just using code Poison in the properties) The health drains down. I use a seperate screen at present to show HP in realtime since having the problems stated above.

The player is to consume something which heals him, thus I want the sub to stop when the item is used.
I cannot seem to find the right code (and I've been trying for last 3 hours now with different combinations) to stop the counter.
I tried
If "Poison" = True Then
Action.RemoveTimedEvent 1
End If
and a whole host of different combos of this and occasionally I get an error saying action.removetimedevent 1 is invalid, or it just does nothing when item is used.
How do I stop the countdowns?
http://www.youtube.com/user/MaynardStaly/videos and http://libertycap.webs.com
“With a bit of luck, his life was ruined forever. Always thinking that just behind some narrow door in all of his favorite bars, men in red woolen shirts are getting incredible kicks from things he’ll never know.”
User avatar
Stitches
Active Member
 
Posts: 71
Joined: Tue Nov 12, 2013 3:56 am
Location: UK

Re: Trouble wih frame merge scores.

Postby reneuend » Sun Dec 15, 2013 8:10 pm

Hi Stitches.

You are kind of making me glad I never used merged frames! :shock:
I will experiment with merged frames today, but I don't have much time. Hopefully, it will be enough to figure this out. The hardest thing to do is to look at snippets of code on this forum and try to understand what is going on...and its harder since I haven't used Merged Frames. I'm sure it is something very simple that is missing. I'm really bad at reading information on this forum..I don't know why. I will reread until I feel like I understand the problem. Is it just simply that the score isn't showing up on the merged frame? Can you step me through the steps as if you were the game player. Let me know the steps leading up to the issue...like going from a frame to another frame, etc....

It's too bad Mystery (a previous avid forum user) isn't around anymore. She was extremely good at reading forum messages and understanding the issue. It takes me a few tries before it sinks in.

Stopping a sub....not sure what you mean, but if a sub is called, and you don't want it to be called you would add an "IF" condition around it.

If flag = 1 then
Call MySub()
end if

if you want to use only part of the sub in certain conditions, then you would put an "IF" condition inside the sub.
I depends on how you are calling your subroutine and what you don't want to run. If it is the CreateTimedEvent command then...

The Action.RemoveTimedEvent works when you have an event running. Did you use the CreateTimedEvent command? If so, did you assign it to a variable like this?

myTimedEvent = Action.CreateTimedEvent .......

Action.RemoveTimedEvent myTimedEvent


Sidenote: I just finished a really cool puzzle using these commands...more on that in the future.


YOU MUST DOWNLOAD AND PRINT THIS REFERENCE DOCUMENT: http://adventuremaker.com/help/vbscript_reference.htm
Here is the online help location: http://adventuremaker.com/help/contents.htm
I have had the same reference for five years and it is really worn!


Are you on a time crunch? Worse case, you can upload your project and I will debug and code it for you.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2690
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: Trouble wih frame merge scores.

Postby Stitches » Sun Dec 15, 2013 9:46 pm

Wow! Thankyou so much.
Like I said I read this viewtopic.php?f=3&t=5248&p=27924&hilit=real+time+score+update#p27924 and the end just says it WORKED! with no explanation as to how. Dunno if this helps.

1st I'll walk you through.

Refer to the pictures above, the status bar on the 2nd picture at the bottom. There are letters HP and EP TOK and SCI where numbers (or values) should be.
Each of these works as a basic counter, or should.
Refer to the first picture, there are numbers displayed in the boxes instead of the the Letters (25,25,10,0). This is how it should look.

The first picture is a test frame of the "StatusBar" (or inventory Button as it is called in my files) frame. This frame is merged with all others EXCEPT an activated player screen. But this isn't important at the moment.

The status bar is merged with all game frames. It is comprised of a single gif image with hollow sections to allow for numbers (since text objects can't go over picture hotspots).
The code implanted in the statusbar frame properties is:

Action.GetMergedTextIndex
Text(1).Caption=""+CStr(HP)
Text(2).Caption=""+CStr(EP)
Text(3).Caption=""+CStr(TOK)
Text(4).Caption=""+CStr(SCI)

This same code is also implanted into the hotspot properties of each interactive hotspot which alters the variable.
Example...
Player gets hurt, 10 health is taken from him,
(remember Death is my subroutine which goes to game over screen at 0 HP)

Death
If HP > 0 Then
HP = HP - 10
End If

Action.GetMergedTextIndex
Text(1).Caption=""+CStr(HP)

I put the Action code after because I assume that updates the text(?).

So far then we have a set of variables (but let's just stick with HP save writing out more bits, the counters all work the same. For instance, TOK = 0 then a message comes up "I'm Broke!" and so forth.)
We have hotspots and events interacting to decrease or increase the variables. All working fine.

When the first picture (status bar frame) and the 2nd picture (outside house frame) are merged, (all frames in game assigned to status bar frame). the scores don't appear (as seen in 2nd pic where it just reads HP EP TOK SCI).

This is problem one. Simple counters being displayed on a merged frame. They work fine on the frame itself, but not when the frame is merged.

2nd problem regarding the subroutine.
The Sub "Poison" is a timer which clocks down the health by 1 point per second until something stops it: a healing mushroom is used.
On Item drag and drop (into a player frame which appears via link from the status bar) the mushroom adds 25HP and 25EP and so forth and then I want it to stop the timer on the HP counting down.

Are you saying With this all I have to do is use:

Poison1 = Action.CreateTimedEvent 1, "poison", True (poison1 being the variable and Poison being the subroutine called)
...in the procedures section. And...
Action.RemoveTimedEvent Poison1 (or should it be full code here? Action.RemoveTimedEvent 1, "poison", True)
...in the item used advanved script section?
Apologies if I made that confusing. I'm as confused looking at code itself. And I have the help file, but these particular little problems, I can't seem to see in there. :shock:

Or should I just have the interactive hotspot change the poison1 variable to 1 (via the variables section) and add the first line there to the proceedures as:

If Poison1 = 1 then
Call Poison () <not sure what these brackets were for? :oops:
End If

Hope this helps with the whole thing. If I get this working I'd be happy to help with some kind of tutorial or something to help others get through this.
http://www.youtube.com/user/MaynardStaly/videos and http://libertycap.webs.com
“With a bit of luck, his life was ruined forever. Always thinking that just behind some narrow door in all of his favorite bars, men in red woolen shirts are getting incredible kicks from things he’ll never know.”
User avatar
Stitches
Active Member
 
Posts: 71
Joined: Tue Nov 12, 2013 3:56 am
Location: UK

Re: Trouble wih frame merge scores.

Postby reneuend » Sun Dec 15, 2013 10:10 pm

Thanks for the detailed explanation.

I'll answer your questions from the previous post and then get back to you on what I find about Merged Frames.
The following is correct.
Code: Select all
Poison1 = Action.CreateTimedEvent( 1, "poison", True)


Code: Select all
Action.RemoveTimedEvent Poison1


Let me check on the timer issue. I use the timer also, but not with merged frames. I don't know if that is why it won't work. Timers should work independent of frames as it is a separate process.

I'll post back soon!
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2690
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: Trouble wih frame merge scores.

Postby Stitches » Mon Dec 16, 2013 11:22 am

Thanks again. Though one problem, that first code

Poison1 = Action.CreateTimedEvent 1, "poison", True

doesn't work. It keeps saying "expected end of statement" When I add it to any VBS box.
The Remove timed event went in fine.
Am I missing a comma somewhere or something?
http://www.youtube.com/user/MaynardStaly/videos and http://libertycap.webs.com
“With a bit of luck, his life was ruined forever. Always thinking that just behind some narrow door in all of his favorite bars, men in red woolen shirts are getting incredible kicks from things he’ll never know.”
User avatar
Stitches
Active Member
 
Posts: 71
Joined: Tue Nov 12, 2013 3:56 am
Location: UK

Re: Trouble wih frame merge scores.

Postby reneuend » Mon Dec 16, 2013 11:19 pm

You need to use parenthesis when you have a call to a subroutine when it is on the right side of an assignment
Code: Select all
Poison1 = Action.CreateTimedEvent(1, "poison", True)



I performed some tests with MergedFrames. I noticed that Text objects are NOT carried over to the mergedframe. If they aren't carried over, how is it supposed to work? Are you sure Text objects are supposed to be carried over?
Had you used the "duplicate" command for your frames, then this would be extremely simple.
It's hindsite, but if you build something where you want to share a menu from one frame to another, I suggest 1 of 2 ways:

1. Build a frame that has all the stuff you want to share among all your frames and call it a template.
2. Right-click on the thumbnail frame in Frames management screen and choose 'duplicate'. Now your score will just update because the index will match among all the text objects.

The other way is to build the menu from a subroutine then call the subroutine from the frames advanced properties.


text(1).caption = cstr(HP)
text(2).caption = cstr(TOK)

:idea: Note that I did not add the double quotes after the equals sign. That is not needed unless you were trying to add spaces before the value. In fact, you dont need the cstr command because it will convert to string on its own.


Sorry, I don't know enough about merged frames. I really don't see the advantage over just duplicating or coding it to build the menu during runtime using a subroutine.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2690
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: Trouble wih frame merge scores.

Postby reneuend » Wed Dec 18, 2013 7:02 am

Stitches. What is the current status for this issue? If you aren't getting anywhere, how about we rebuild it without merging frames? I will help.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2690
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: Trouble wih frame merge scores.

Postby Stitches » Fri Dec 20, 2013 6:26 pm

Hi, Renuened. SOrry been a lil absent this week. After getting mildly frustrated with the merging this I started one fro scratch in hopes of not getting too far ahead of myself. The timed event code is perfect and works like a charm, just the menu troubles. However, through this I have been able to learn more scripts and wrap my head around sub routines so it's been decent. I'm at present putting a pin in this game and currently animated a new, short and sweet, first person game to compile and release and upload here for xmas. I decided to make the latest episode of my cartoon 'sodoff kitty' in game format. Basically a point and click animated episode. Will post more on this in the new games section when the trailer is up. If you or anyone on these oards manages to find a way to make real time txt update and appear on a merged frame, please let me know- if I figure it, I'll post a tutorial. Been a busy week. I really appreciate the offer of helping me rebuild and if I cannot find a way to do it by new year then aye, I will ask for help then. You'll probably be the first to play my sodoff kitty game when it's up. In fact, if you want, you can be the first tester. It's meant as a xmas present to friend and fans, so it ain't gonna be epic. More like an interactive episode with a few fruity touches.
Thanks for also checking out the youtube channel. Sorry for no reply there yet, ain't signed in for a bit to do anything really. Only popped in and out of most social media to check up whilst working on this. Don't get me wrong, I'm still working on the Resin game (in this whole post) but since getting a bit miffed and a little over my own head, I felt it better to scratch up something new to practice coding skills and variable switches etc. should have game finished for xmas eve at latest. Then just a matter of uploading it somewhere to link to my site. Very much cheers. I'll keep you posted if I managed to fluke this merging issue. And thankyou so much for all your help so far dude. You've been a friggin lantern for me here. One will definitely be put in the acknowledgements. (should I acknowledge renuened or you actual name (which be in my email?
http://www.youtube.com/user/MaynardStaly/videos and http://libertycap.webs.com
“With a bit of luck, his life was ruined forever. Always thinking that just behind some narrow door in all of his favorite bars, men in red woolen shirts are getting incredible kicks from things he’ll never know.”
User avatar
Stitches
Active Member
 
Posts: 71
Joined: Tue Nov 12, 2013 3:56 am
Location: UK

Re: Trouble wih frame merge scores.

Postby reneuend » Fri Dec 20, 2013 8:24 pm

Nice to hear from you!

I know a way around the issue, but not sure you will like it. The following methodology will work with or without mergedframes.

From Project Properties - Advanced - 2nd Checkbox

You can add the following code to create a global textbox object:

Note that I set enabled to False. This is so the text can't be edited by the player. Enabled = False makes it readonly.

Code: Select all
UnLoadControl TextBoxObject(1)
LoadControl TextBoxObject(1)
TextBoxObject(1).Visible = true
TextBoxObject(1).Move 100*15, 100*15, 200*15, 20*15
TextBoxObject(1).Text = "This is a test"
TextBoxObject(1).Enabled = False


On frames where you want to update this control. Do the following in your Frame's Advanced Tab:

Code: Select all
TextBoxObject(1).Text = HP


You can use either name for me or none at all. I'm glad to help. Thanks for the acknowledgement though.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2690
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: Trouble wih frame merge scores.

Postby Stitches » Thu Jan 30, 2014 2:45 am

After a while, I found a trick around this. I started this game again and am working on duplicate frames. Basically I created a .gif for the inventory which had a transparent spot for each section needed for text. Then I merged an inventory frame to the main frame; of which I had logged the top/left points of the transparent boxes. Then on the main frame, aligned with the co-ordinates of the box, I input the text spots (so until merged frame is activated during play, the text is merely overlayed over a black bar on the bottom of the frame. Each background is 1024x768 with a 1024x100 black bar at the bottom (I converted all my frames from 1024x700 to 768 enabling a black canvas extension). Now with the above codes and the duplication of the main frame (with different backgrounds set) I don't have to naff about. Tips for anyboy else there who might be in same bother. :)
http://www.youtube.com/user/MaynardStaly/videos and http://libertycap.webs.com
“With a bit of luck, his life was ruined forever. Always thinking that just behind some narrow door in all of his favorite bars, men in red woolen shirts are getting incredible kicks from things he’ll never know.”
User avatar
Stitches
Active Member
 
Posts: 71
Joined: Tue Nov 12, 2013 3:56 am
Location: UK

Re: Trouble wih frame merge scores.

Postby reneuend » Thu Jan 30, 2014 3:29 am

Good Job staying with it and not getting too frustrated! It will get easier as you build more games. Part of the fun is trying new things, right?

Keep us up-to-date on your progress. This game is looking really nice. If its anything like your animation in the Sodoff Kitty game, it will be fun.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2690
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: Trouble wih frame merge scores.

Postby Stitches » Sun Feb 02, 2014 11:13 pm

I just finished the first draft of my menu and inventory system based on this...
Attachments
3.jpg
3.jpg (234.91 KiB) Viewed 6632 times
2.jpg
2.jpg (227.37 KiB) Viewed 6632 times
1.jpg
1.jpg (218.38 KiB) Viewed 6632 times
http://www.youtube.com/user/MaynardStaly/videos and http://libertycap.webs.com
“With a bit of luck, his life was ruined forever. Always thinking that just behind some narrow door in all of his favorite bars, men in red woolen shirts are getting incredible kicks from things he’ll never know.”
User avatar
Stitches
Active Member
 
Posts: 71
Joined: Tue Nov 12, 2013 3:56 am
Location: UK

Re: Trouble wih frame merge scores.

Postby reneuend » Mon Feb 03, 2014 12:27 am

Nice layout, Stitches. Be sure to add a tutorial on your menu!
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2690
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA


Return to Post Your Own Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests

cron