Summon Monster Via Item Pickup

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
User avatar
Misery
Posts: 157
Joined: Sun Nov 04, 2018 4:57 pm

Summon Monster Via Item Pickup

Post by Misery »

How do you remove +FRIENDLY flag from monsters summoned via A_SpawnItemEx, and is it possible to script a short delay before they're summoned?

Code: Select all

Class FakeRedKey : CustomInventory

{

	Default
	{
		//$Category Original
		//$Title Fake Red Key
		//$Sprite RSKU
		Inventory.Icon "STKEYS5";
		Inventory.PickupSound "misc/k_pkup";
		Inventory.PickupMessage "Yes, the Red Key!";
	}

	States
	{
		Spawn:
			RSKU A 10;
			RSKU B 10 Bright;
			Loop;
		Pickup:
			TNT1 A 70;
			TNT1 A 0 A_SpawnItemEx ("Archvile", -64, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION);
			Stop;
	}
}

Return to “Assets (and other stuff)”