Difference between revisions of "Activation Functions"

5 bytes removed ,  17:58, 11 September 2006
no edit summary
imported>Elder
m
imported>Elder
Line 93: Line 93:
One way to fix this is to pass another actor ref instead of player. However, it depends on what you wish to achieve.
One way to fix this is to pass another actor ref instead of player. However, it depends on what you wish to achieve.


If you really want a static function then your best option is to use a remote static persistent token object - i.e. a true world activator object (e.g. a switch). This has no such issues and has the advantage of being slightly neater call syntax:
If you really want a static function then your best option is to use a remote persistent object - i.e. a true world activator object (e.g. a switch). This has no such issues and has the advantage of being slightly neater call syntax:


  IGFActRef.Activate player
  IGFActRef.Activate player
Line 99: Line 99:
(Additionally you do not have to mark the placed IGFRef as initially disabled unless you need it to activate as a sensor for when the player is nearby.)
(Additionally you do not have to mark the placed IGFRef as initially disabled unless you need it to activate as a sensor for when the player is nearby.)


The disadvantage of this is that the GameMode part of the script will never be that useful since the activator item is remote. If you use items, as described above, you can always teleport them to the player location so they trigger every frame. However, in this case you may be better off using an unplayable item (aka token) on the player and using the OnActivate method or switch it on using globals.
The disadvantage of this is that the GameMode part of the script will never be that useful since the activator item is remote. If you use items, as described above, you can always teleport them to the player location so they trigger every frame. However, in this case you may be better off using an unplayable item (aka token) on the player and using the OnActivate method or switch it on using quest variables.




Anonymous user