Duke4.net Forums: How to activate something? - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to activate something?  "Custom "switch" to open door"

#1

Hi!

Maybe it's a stupid question, but how can I get my useractor to open a door when I press the spacebar?

I have a room with a few pictures on the wall. One spot is empty. The player has to get a picture from a different room and put it in place, then a door should open.
My Code for the picture + pickup:

//The PICWALLSPRITE - Empty spot where picture should go
useractor notenemy PICWALLSPRITE
cstat 16

ifp pfacing
	ifpdistl 1024
	{
		ifvare gotpicture 0
		{
				ifhitspace
				{
						sound DUKE_SEARCH			
						quote 130
				}
		}
		else
		{
			ifhitspace
			{
					sound DUKE_SEARCH
					subvar gotpicture 1
					strength 20
					quote 132
					cactor PICONWALL
			}
		}
	}
enda


//PICONWALL - The picture on the wall
useractor notenemy PICONWALL 20
cstat 273
spritepal 0
ifp pfacing
	ifpdistl 1024
	{
		ifhitspace
		{
			quote 133
			sleeptime 128
		}
	}
enda

//The picture-pickup
useractor notenemy PICPICKUP
sizeat 50 50
cstat 273

ifvare gotpicture 0
		ifpdistl 1024
		{
			ifhitspace
			{
				sound SELECT_WEAPON 	
				palfrom 16 0 64 0
				quote 131
				addvar gotpicture 1
				killit
			}
		}
enda


Thanks in advance!
0

User is online   Danukem 

  • Duke Plus Developer

#2

Check out the "operateactivators" command on this list: http://wiki.eduke32....ll_command_list

Also check out the similar commands starting with "operate"
0

#3

View PostTrooper Dan, on 15 October 2016 - 01:43 AM, said:

Check out the "operateactivators" command on this list: http://wiki.eduke32....ll_command_list

Also check out the similar commands starting with "operate"



Oh man.. I only looked in the ConFaq42. Thank you!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options