Announcement

Collapse
No announcement yet.

Calling a global variable from an actor?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Calling a global variable from an actor?

    Hello everyone! I recently started with unreal C ++ and want to know how I can call a public variable from a character class of an actor, for example: My character shoots and runs out of ammo, I want him to take a box of ammo and get the full charger .
    I have read a lot of posts on this topic, but 90% is for BP and 10% I could not understand very well. Thank you very much!

    If you want there's the code:
     
    Spoiler

    #2
    You can try:
    AMyCharacter* myGuy = Cast<AMyCharacter>(OtherActor);
    SolidGasGames

    Comment


      #3
      thanx so much!!

      Comment

      Working...
      X