Forum rules - please read before posting.

Character/object variables?

I've been looking in the manual and forum for this but can characters or objects have variables? For instance, if a character has a gender variable, an unhandled give interaction could say "I don't think [gender]'d want that" and it would dynamically change it to "she'd" or "he'd"; either that or a per-character variable could be checked and the relevant branch of dialogue could be played. Sorry if this is really obvious but I couldn't see anything that allowed for per object variables?

Comments

  • If a feature is not in the Manual, then it's not in AC.  Once again, custom events allow you to extend functionality in cases like this.

    An unhandled interaction with a GameObject parameter can have that parameter set to the Hotspot that it's run for.  Therefore, if you attach a script with gender data to that Hotspot, you can hook into the OnBeginActionList event, read that parameter's value to get the gender data, and update a separate String parameter accordingly.
  • An alternative solution, and one that doesn't require any scripting (but will require a wait) is to use the new "Object: Check tag" Action that will be coming in v1.66.

    This Action can check what a GameObject is tagged with, so you could tag your NPCs up as e.g. Male / Female, and have your interaction assets display "he"/"she" speech accordingly.  This too can be parameterised, so checking the Hotspot GameObject parameter can be done procedurally.
  • That would be awesome! I can think of several uses for an object tag that can affect an actionlist's branch, so that'll be really useful, thanks! (Btw, I always read your responses, I just don't response myself unless I need to bother you as I know how busy you are! ;) )
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.