Cobys
(Cobys)
October 25, 2014, 12:28pm
1
Hello, for five days I have a problem whith the variable and blueprint.
I have create variable in my code but the variable dont declared in blueprint?
I have try create variable for other item but it is the same thing.
I have remarque that during the generation that the code dont updating.
Thank you for answer.
eXi
(Cedric Neukirchen)
October 25, 2014, 12:33pm
2
Would you mind posting the code you used? Maybe you have a typo or something (:
Cobys
(Cobys)
October 25, 2014, 1:18pm
3
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "AzordianChampWeapon_Projectile.generated.h"
USTRUCT()
struct FProjectileWeaponData
{
GENERATED_USTRUCT_BODY()
/** projectile class */
UPROPERTY(EditDefaultsOnly, Category=Projectile)
TSubclassOf<class AAzordianChampProjectile> ProjectileClass;
/** life time */
UPROPERTY(EditDefaultsOnly, Category=Projectile)
float ProjectileLife;
/** damage at impact point */
UPROPERTY(EditDefaultsOnly, Category=WeaponStat)
int32 ExplosionDamage;
UPROPERTY(EditDefaultsOnly, Category = WeaponStat)
int32 test; /* <============================ My variable create*/
/** radius of damage */
UPROPERTY(EditDefaultsOnly, Category=WeaponStat)
float ExplosionRadius;
/** type of damage */
UPROPERTY(EditDefaultsOnly, Category=WeaponStat)
TSubclassOf<UDamageType> DamageType;
/** defaults */
FProjectileWeaponData()
{
ProjectileClass = NULL;
ProjectileLife = 10.0f;
ExplosionDamage = 100;
ExplosionRadius = 300.0f;
test = 100; /* <============================ My variable create*/
DamageType = UDamageType::StaticClass();
}
};
// A weapon that fires a visible projectile
UCLASS(Abstract)
class AAzordianChampWeapon_Projectile : public AAzordianChampWeapon
{
GENERATED_UCLASS_BODY()
/** apply config on projectile */
void ApplyWeaponConfig(FProjectileWeaponData& Data);
protected:
virtual EAmmoType GetAmmoType() const override
{
return EAmmoType::ERocket;
}
/** weapon config */
UPROPERTY(EditDefaultsOnly, Category=Config)
FProjectileWeaponData ProjectileConfig;
//////////////////////////////////////////////////////////////////////////
// Weapon usage
/** [local] weapon specific fire implementation */
virtual void FireWeapon() override;
/** spawn projectile on server */
UFUNCTION(reliable, server, WithValidation)
void ServerFireProjectile(FVector Origin, FVector_NetQuantizeNormal ShootDir);
};
My variable create is “test”
eXi
(Cedric Neukirchen)
October 25, 2014, 1:26pm
4
Hm, so only the “Test” - Variable doesn’t show up in your Blueprint? The others like “ExplosionDamage” work?
Cobys
(Cobys)
October 25, 2014, 2:08pm
5
Thank you for your assistance.
The others vaiable display is blueprint.
eXi
(Cedric Neukirchen)
October 25, 2014, 2:28pm
6
If you create a new blueprint from the changed and recompiled class, does the variable “test” appear?
Cobys
(Cobys)
October 25, 2014, 2:50pm
7
No the variable test dont appear
eXi
(Cedric Neukirchen)
October 25, 2014, 2:52pm
8
Ehm, would you mind trying to write “Test” and not “test”. So using a capital letter.
And please, use the “reply” or “add comment” button instead of posting an answer every time.
Cobys
(Cobys)
October 25, 2014, 3:38pm
9
I dont have the buttom reply or add comment.
Excuse me.
I using a capital letter and it is the same resultate
eXi
(Cedric Neukirchen)
October 25, 2014, 3:55pm
10
Isn’t there a reply button when you move over one of my comments with your mouse?
At topic: Hm, then i can only guess. I don’t see any difference to your other variables. The only thing that is different is the way you declared the category.
Try removing the spaces and write the Category like you did in the other UPROPERTYs.
Not “Category = WeaponStat” but “Category=WeaponStat”.
Cobys
(Cobys)
October 25, 2014, 4:55pm
11
I remarque a problem during the generate.
I create new class and generate but my class dont appear and nothing appear in the out of generation.
Cobys
(Cobys)
October 26, 2014, 10:42am
12
Problem is resolut change generate “debug game” ===> “Developper game”
Thank you for you assistance. Goodbye
eXi
(Cedric Neukirchen)
October 26, 2014, 11:26am
13
Ok, that is something i havent thought about. Would you like to mark your question as solved by clicking the check mark at the left side of this answer? (: So everyone knows its solved already.