Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Slav on March 10, 2011, 06:30:56 PM

Title: Entities names ("Entity" postfix).
Post by: Slav on March 10, 2011, 06:30:56 PM
Hello. Language syntax and engine question.
If you dynamically create entity and apply it's name, for example, "cheese" and then (at some other place within code) compare it's name with "cheeseEntity" - will such comparison be passed? Must they be evaluated as identical?
Title: Re: Entities names ("Entity" postfix).
Post by: Prote1n on March 10, 2011, 06:40:56 PM
you have to use

Code: [Select]
if (Entity.Name =="cheese") .... ;
Title: Re: Entities names ("Entity" postfix).
Post by: Slav on March 10, 2011, 06:51:33 PM
I am not writing any scripts - I am just porting already written code to Flash - so must I evaluate "cheese" and "cheeseEntity" as identical?
And if yes - so is it only for native objects of type "Entity"?
Title: Re: Entities names ("Entity" postfix).
Post by: Mnemonic on March 10, 2011, 07:27:12 PM
There's no "Entity" suffix. Not sure what gave you the idea.