access a static mesh and change its location ?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

shihchiy

New Member
Feb 1, 2005
15
0
0
In Unrealscript, how can I access a static mesh and change its location ?

For example, there is a static mesh 'cf_staticMushrooms.cf_gdc_mushroom06' in the map. How can I declare a variable to access this static mesh ? And change its location.....

Best

Luke
 

shihchiy

New Member
Feb 1, 2005
15
0
0
Further questions:

(1) Should I load the static mesh into the map in UnrealEditor first ? Or can I set the static mesh and set its position directly through code ?

(2) Should I set "bStatic" as false that the location of static mesh can be changed ?

Best

Luke


[SAS]Solid Snake said:
Code:
var staticmesh mystaticmesh
Defines a variable. You will have to 'find' this static mesh through OOP principles.

As for changing the location you can use SetLocation(vector NewVector).