Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Is it possible to construct a valid AGK statement/command from string manipulations?

Author
Message
ProfVersaggi
12
Years of Service
User Offline
Joined: 6th Apr 2012
Location: Maastricht Netherlands / Chicago, USA
Posted: 27th Feb 2013 13:45
I'd like to do (something like) the following:

baseType$ = "enemy" (instantiate a local string variable)

and then use it to construct a statement like:

baseType$.inflictedDamage = 100

given the following TypeDef:




Is anything like this possible in AppGameKit?

----
From the Desk of Prof Versaggi ...
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 27th Feb 2013 14:06
So the 'enemy' would be treated as an actual variable?

No I'm afraid, you can't add a variable at runtime, all you could do is have a bank of variables ready to be used up, like an array of _enemy.

I got a fever, and the only prescription, is more memes.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 27th Feb 2013 16:04 Edited at: 27th Feb 2013 16:04
You could do something like this...



I live for video games! (And beers, and football, and cars!)
See what I live for here: [url]http:\\www.TeamDefiant.co.uk[/url]
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Feb 2013 16:31
ProfVersaggi, the answer to your original question is "No, not possible in AppGameKit Tier 1".

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-05-02 20:19:41
Your offset time is: 2024-05-02 20:19:41