Not logged inOpenClonk Forum
Up Topic Functions in proplist constants, Effects

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Anonymous
Couldn't one even use Properties to categorize Effects now? The per-name categories like eg *PSpell, *Fire* depend on their position in the effect name, thus are not arbitrarily combinable. As Effects are proplist defined before Effect creation, one could do sth like this:

var eff = new Global {
Construction = ...,
Timer = ...,
IsFire = true,
IsSpell = true,
}

and implement a function like GetEffectByProperty (or extend GetEffect). With this one you could do GetEffectByProperty("IsFire", ...) instead of GetEffect("*Fire*", ...).
But the effects proplist would need to be passed to th Effect-Callback of effects of higher priority, to be really useful. It seems a bit strange to get a effect passed you may not interact with. But values that are not yet initialized may simply be nil, or it may be "undefined" to access them. The values defined in the proplist to create the effect from would be accessible.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill