Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Pro-tip: be extremely cautious with WeaponFire classes. WeaponFire is an object (not an actor). Therefore, it CANNOT be replicated. However, it is a native object, where some "magic" happens in C++ code that provides network syncing. However, it is not the same network replication in terms of UnrealScript.
What does that mean? WeaponFire object on the server side and the "same" object on the client are two different objects - they are not simulated. Only actors can be simulated, which WeapnFire isn't. Hence, the keyword "simulated" means nothing inside WeaponFire, and the "replication" statement does not work. To distinguish between the server and the client, check the weapon's role:
I would move the entire "destroy" code into the Weapon class - there is less chance to shoot yourself in the foot. For instance, you can override ConsumeAmmo() to do the check there:
I want to consume 3/3 sticks, and then destroyed. How can I do this? I tried with this, and it works, but I don't think this is correct.