The Daily Click ::. Forums ::. Klik Coding Help ::. Edit & Rich Edit Objects a problem I have with them
 

Post Reply  Post Oekaki 
 

Posted By Message

Tristan Clark



Registered
  28/07/2003
Points
  159
28th July, 2003 at 20:20:14 -

Hi guys,
When setting the text for an edit object in the event editor, it seems I can either put in a bunch of words, OR I can retrieve data from an object, but I cannot do both in one command. Here's an example:
I can type in 'Goodie does 4 damage to Baddie.' Or I can put in 'value("Baddie Health Counter")'. When I try to combine the two in any way, it gives me a syntax error.
Is it possible at all to combine them? I'd like to have it end up reading like 'Goodie does X damage to Baddie', where X is a changeable value. Otherwise, are there any alternatives that might work?

Thanks a lot!

 
n/a

Kramy



Registered
  08/06/2002
Points
  1888
28th July, 2003 at 20:59:37 -

[name of char]+" does "+ str$(value("counter name here"))+ " damage to "+ [name of second char]+"."

 
Kramy

Kramy



Registered
  08/06/2002
Points
  1888
28th July, 2003 at 21:02:50 -

Goodie does 4 damage to Baddie.

------------------------------
Use str$(object with value in here) to convert a value to a string
Use val(object with string in here) to convert a string to a value

 
Kramy

Tristan Clark



Registered
  28/07/2003
Points
  159
28th July, 2003 at 21:52:38 -

Awesome, you're a legend, cheers!
Another problem is I need to somehow get an active object to be able to go on top of the edit object - is there any way to do this, or are edit objects permanently stuck in front of most other things?

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
29th July, 2003 at 01:47:28 -

Edit objects are permently on the top, but you can make them transparent.

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Tristan Clark



Registered
  28/07/2003
Points
  159
30th July, 2003 at 04:52:15 -

Damn. I don't suppose there's a way to get the text to scroll on - like, appear letter by letter, as if someone were typing the words on the screen.

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
30th July, 2003 at 05:03:27 -

It's not an option, but its easily done.

Create two strings, one displaying what you want to type out (invisible/offscreen), and the other blank and on the screen. And create one counter.

Code:

Every 0.20 secs - stringonscreen.text = Left$( stringoffscreen.text, counter.value )add one to counter.

And it's as simple as that.

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Kramy



Registered
  08/06/2002
Points
  1888
30th July, 2003 at 13:47:33 -

Aw...wish I had gotten on earlier to answer first. Boosts ego.

 
Kramy

Tristan Clark



Registered
  28/07/2003
Points
  159
31st July, 2003 at 03:18:55 -

So those Left and Right buttons do serve some purpose...cheers guys! What other kind of things can you do with those buttons?

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
31st July, 2003 at 03:31:35 -

Well they are just shortcuts to other things that can be found in expressions under "Special".

Left Get's the left most character(s) depending on the value that follows.
Right Get's the right most character(s) depending on the value that follows.
Mid Get's the middle character(s) depending on the value that follows.

They are some string ones, but most of the other buttons are maths.

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Tristan Clark



Registered
  28/07/2003
Points
  159
31st July, 2003 at 21:05:47 -

Hmm, a new problem has arisen...
The text scrolls on great, but a lot of the time it'll start the next word at the end of the line, and there won't be enough room. It will then type out the whole word again on the following line, ending up with something like this:

Hello there! I hope you had a go
good trip. It would have been ni
nice to go with you.

Any ideas on how to fix that?
Cheers.

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
1st August, 2003 at 02:06:29 -

Um not at the moment, what code are you using?

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Kramy



Registered
  08/06/2002
Points
  1888
1st August, 2003 at 14:37:30 -

I had a problem like that when I loaded the text off a string.(not sure why) It might be something to do with what characters the string thinks is a value.(maybe after a newline it lowers the character value by 2? - your 4 letter words had 2 letters cut off) Anyway, when I changed it to an edit box, it worked. If you're already using an edit box though to get the text...then I don't know what it could be.

Edit: If you're not using an edit box try using one, but make sure the settings have horizontal autoscroll on, and multiline off, otherwise it will be just like a string.(I think)

Image Edited by the Author.

 
Kramy

Tristan Clark



Registered
  28/07/2003
Points
  159
1st August, 2003 at 19:17:45 -

I was already getting the text off an edit box, the problem is probably with the visible one, I just have no idea how to solve it. Quite annoying!

 
n/a

Kramy



Registered
  08/06/2002
Points
  1888
2nd August, 2003 at 14:28:01 -

Hmm...yeah, that would be. Well, if you send it to me I'll see if I can get it to work, but no guarentees.

kramy@telus.net

Image Edited by the Author.

 
Kramy

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
2nd August, 2003 at 18:05:37 -

Kramy - Do you ask everyone to send you everything>?

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Kramy



Registered
  08/06/2002
Points
  1888
2nd August, 2003 at 19:04:09 -

Yes - Hey, can you send my your avatar? j/k

Really I'm kind of bored...I'm waiting for graphics so I can implement the combat systems into my RPG.

Since I don't have any I'm trying to fill time.
It wouldn't bug me to sift through someone else's coding to try and fix problems.

 
Kramy

Kramy



Registered
  08/06/2002
Points
  1888
2nd August, 2003 at 19:06:41 -

Hey, that's actually one thing I'm curious about...why is your avatar not transparent in parts?

Image Edited by the Author.

 
Kramy

Tristan Clark



Registered
  28/07/2003
Points
  159
4th August, 2003 at 03:24:35 -

Hah, yeh I can send you the program. I'll lift out the text code and send that, so it'll be way smaller.
That's funny, this is for an RPG too, that is also awaiting combat graphics.

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
4th August, 2003 at 06:11:01 -

Non-Transparent? I don't see any. Where abouts is it?

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Kramy



Registered
  08/06/2002
Points
  1888
4th August, 2003 at 13:17:51 -

All programs on my comp pick up 255,255,255(absolute white) as transparent. Parts of your avatar are, while the original background is not. This makes the background show through in little blocks...looks crummy It may have been caused by using a different white when drawing some of the objects in it(like bullets)

 
Kramy

Tristan Clark



Registered
  28/07/2003
Points
  159
4th August, 2003 at 18:04:22 -

Right, well I've isolated the problem. For some reason, this scrolling text thing only stuffs up when I maximise the program, and get it to resize the display. When I have it as a little windowed application, it runs fine. Any ideas?

 
n/a

Kramy



Registered
  08/06/2002
Points
  1888
4th August, 2003 at 18:10:21 -

Are you displaying the text at a position or do you have it as a " " in the correct position, then just change its alterable string to add the text?

 
Kramy

Tristan Clark



Registered
  28/07/2003
Points
  159
4th August, 2003 at 18:23:11 -

Yeh, I think I just change the alterable string of the on-screen edit box to match the text of a hidden one.

 
n/a

Tristan Clark



Registered
  28/07/2003
Points
  159
4th August, 2003 at 18:43:27 -

That'd work fine JonWoG, except I need to use an edit object as it will always be hovering over active objects - strings are always behind.

 
n/a

Tristan Clark



Registered
  28/07/2003
Points
  159
4th August, 2003 at 19:01:31 -

Hmm, this sounds quite different to what I'm aiming at. The end result I'm after is your character next to another, and when you press a button, the edit object scrolls up, and the text scrolls on letter by letter. It won't be editable, there won't be any mouse. The problem I have is the stuttering thing I mentioned above.

 
n/a

Tristan Clark



Registered
  28/07/2003
Points
  159
5th August, 2003 at 00:34:48 -

So basically, the problem only arises when I have 'resize display to fill current window size' switched on, which is something that I need. Does this happen to anyone else, and are there any ways to work around it?

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
5th August, 2003 at 01:09:46 -

You could use the "display object" or any other object that can change the resolution for you.

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Tristan Clark



Registered
  28/07/2003
Points
  159
5th August, 2003 at 01:55:41 -

Ah, I've found the problem: it doesn't repeat bits of itself if you don't have the 'transparent' option on.

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
6th August, 2003 at 02:49:10 -

Yeah! Now this big post can end. Nobody say anything else ok?

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Kramy



Registered
  08/06/2002
Points
  1888
6th August, 2003 at 13:17:59 -

Ok

Edit: Don't end a post with a question.

Image Edited by the Author.

 
Kramy
   

Post Reply



 



Advertisement

Worth A Click