Is it possible to set an actor's mesh dynamically at spawn?

Discussions about Coding and Scripting
Post Reply
User avatar
Dizzy
Experienced
Posts: 109
Joined: Tue May 21, 2013 3:57 pm
Personal rank: Oaf
Contact:

Is it possible to set an actor's mesh dynamically at spawn?

Post by Dizzy »

I'm attempting to make a UT script which will replace certain actors in a map with a new custom actor.

The old actor is replaced using the standard ReplaceWith() function, and I am copying some of the old actor's properties over to the new actor such as DrawScale or Location (via MyNewActor.SetLocation()).

What I can't figure out is how to copy the old actor's Mesh over to the new one.

I've looked for a UT99 Actor.SetMesh function but can't find one, and I've tried the following code:

Code: Select all

local mesh oldMesh;
// ...
oldMesh = OldActor.Mesh;
// ...
MyNewActor.Mesh = oldMesh;
Is there a way to do this?

Cheers
Join the BunnyTrack.net Discord chat server: https://www.bunnytrack.net/discord
Post Reply