This forum is locked and will eventually go offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk

Forum rules

Cast issue on IObjectPlayerSpawnTrigger

Here you can find all solved gameplay problems and bugs (beginning from Pre-Alpha 1.8.8).
Forum rules
By using the forum you agree to the following rules. For this forum you also need to follow these additional rules.
Locked
User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 27

Cast issue on IObjectPlayerSpawnTrigger

Post by JakSparro98 » Sun Apr 05, 2020 6:51 pm

When populating the melee item field with SetSpawnWeaponItemMelee() it will later throw a cast error when calling Trigger().

Code: Select all

public void OnStartup()
{
IObjectPlayerSpawnTrigger spawn= (IObjectPlayerSpawnTrigger )Game.CreateObject("PlayerSpawnTrigger");
spawn.SetSpawnWeaponItemMelee(WeaponItem.NONE);
spawn.Trigger();
}
1 x

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1887
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 36

Post by Gurt » Sun Apr 26, 2020 12:36 pm

Fixed after v.1.3.5.
0 x
Gurt

Locked