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?
------------------------------
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
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
29th July, 2003 at 01:47:28 -
Edit objects are permently on the top, but you can make them transparent.
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
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.
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
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)