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
The parameter owner expects a variable that can be interperated as a FlareGun, so anything that extends or is a FlareGun will work.
this refers to the current instance, and if used in the FlareGun class it will be a FlareGun, and when you use this in your FlareShot class it will be a FlareShot.
so to fix it you have to pass a value that can be Interperated as a FlareGun.
Since the owner variable isnt actually used anywhere in the flare you can set it to the default value (i.e null), this would crash the game in most instances but not now since its not used for some reason.
Another way of doing it is to make this convertable to a FlareGun. To do so you just extend your FlareShot to FlareGun.
I recommend reading/watching some c# tutorials as it will help greatly in the long run.
http://csharp.net-tutorials.com/classes/introduction/ --this explains how class inheritance and object orientation work so that you can get a more in depth knowledge of why you got the error
Now there is only one last question i have:
Since we're using OnPressAction() to fire the flare, the "this._fireWait" doesn't apply.
Is there a way to add a cooldown to the gun? Or even better, can you add the reload animation, from the sniper or Old Pistol? _wait doesnt work sadly.?
pseudo code (try coding it for yourself before you copy/paste, trial and error is good for you):
Instead of making it the same as _fireWait, i made a separate number and it worked out nicely.
Thanks for all the help