Results 1 to 6 of 6

Hybrid View

  1. #1
    MSgt. Shooter Person
    Join Date
    Jun 2008
    Posts
    417

    Default Change actor sprite in editor based on variable?

    Hi, I'm wondering if it's possible to have an actor placed in the editor that changes its sprite based on a variable set by the LD. Is there a "refresh" function that is called whenever an LD changes a property or moves an actor in the editor?

  2. #2
    MSgt. Shooter Person
    Join Date
    May 2009
    Location
    California
    Posts
    372

    Default

    AFAIK, this is all hard-coded native stuff.
    "Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are,
    by definition, not smart enough to debug it." - Brian W. Kernighan

  3. #3

    Default

    The UnrealEd doesn't execute any UnrealScript code for actors in the level to edit. It's impossible to add such a feature without access to the engine's native C++ sources.
    Wormbo's UT/UT2004/UT3 mods | PlanetJailbreak | Unreal Wiki | Liandri Archives

    <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort
    <TNSe> nono
    <TNSe> its always funny to find code a week later you dont even remember writing
    <Pfhoenix> what's worse is when you have a Star Wars moment
    <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!"
    Note that your questions via PMs will be ignored if they actually belong in the forum.

  4. #4

    Default

    humm depends on what you need, you may be explaining it or wording it wrongly. if you want a sprite to show and hide, you can do that with a custom trigger class, it basically works like this, show while in activation range (ie, the cylinder component) or hide when untouched.

    that works for single player trigger icons, you might be able to add more sprites and hide the ones you dont need and such, just make it show the one you need.

    Once again Im not sure what the end result your looking for is, but I can promise you this, just cause there isnt a direct or logical way to do something in unreal, doesnt mean you cant come up with a creative solution
    Released Games:
    -Fridge Raider
    -Laser Vault

    Upcoming Titles:
    -Raid
    -Epar

    Demo Reel 2011 (WIP):
    -Demo 2011 (WIP)

  5. #5

    Default

    That's completely besides the point. He wants the sprite to automatically change in the editor based on properties the mapper sets, not in the game.
    Wormbo's UT/UT2004/UT3 mods | PlanetJailbreak | Unreal Wiki | Liandri Archives

    <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort
    <TNSe> nono
    <TNSe> its always funny to find code a week later you dont even remember writing
    <Pfhoenix> what's worse is when you have a Star Wars moment
    <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!"
    Note that your questions via PMs will be ignored if they actually belong in the forum.

  6. #6
    MSgt. Shooter Person
    Join Date
    Jun 2008
    Posts
    417

    Default

    Quote Originally Posted by Wormbo View Post
    He wants the sprite to automatically change in the editor based on properties the mapper sets, not in the game.
    Right, I'm just looking to do something to help clarify things for mappers. I was guessing it would have to be native, but was just hoping there was some way to do it through script. The inspiration came from watching path nodes change from the apple to the "bad size" icon when they are moved too close to a surface:


    What I have is an enemy spawner that creates different baddies based on an enumerator. However, it gets confusing when there's a bunch of spawners in a level and they all look the same, it's difficult to tell at a glance what enemies are actually going to show up. I might just make a subclass of the spawner for each enemy type and give them a unique icon. It hurts some of the flexibility of the actor (if the LD wants to change the enemy, he would have to place another actor instead of just changing a variable), but might be worth it overall.

    Thanks for the replies!


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.