 Hendricks266, on 17 June 2013 - 05:53 PM, said:
Hendricks266, on 17 June 2013 - 05:53 PM, said:
how set up a view portal in mapster?
 Hendricks266, on 17 June 2013 - 05:53 PM, said:
Hendricks266, on 17 June 2013 - 05:53 PM, said:
 Hendricks266, on 18 June 2013 - 08:27 AM, said:
Hendricks266, on 18 June 2013 - 08:27 AM, said:
 James, on 21 June 2013 - 04:32 AM, said:
James, on 21 June 2013 - 04:32 AM, said:
 RichardStorm, on 29 June 2013 - 03:21 AM, said:
RichardStorm, on 29 June 2013 - 03:21 AM, said:
gamevar musicVolume -1 1
gamevar musicLevel -1 1
state reset_music
    setvar musicVolume -1
    setvar musicLevel -1
ends
state trigger_music
    ifvarg musicVolume -1
        setuserdef[THISACTOR].volume_number musicVolume 
    ifvarg musicLevel -1
        starttrackvar musicLevel
    // always reset to the proper value
    setuserdef[THISACTOR].volume_number VOLUME
ends
onevent EVENT_RESETPLAYER
    state reset_music
endevent
onevent EVENT_ENTERLEVEL
    state reset_music
endevent
onevent EVENT_LOADGAME
    state trigger_music
endeventgetactor[THISACTOR].z TEMP espawn WHATYOUWANTTOSPAWN subvar TEMP 4096 // This will move it up a bit setactor[RETURN].z TEMP
This post has been edited by James: 30 June 2013 - 11:01 AM
 
						
                                                This post has been edited by Mark.: 30 June 2013 - 11:56 AM
This post has been edited by Mark.: 30 June 2013 - 12:16 PM
gamevar TEMP 0 2 // gamevars should be outside of actors
useractor notenemy MYACTOR
ifhitweapon 
{ 
strength 1
action ANIM2
sound XXX
getactor[THISACTOR].z TEMP 
espawn XXXX 
addvar TEMP 4096 // This will move it up a bit 
setactor[RETURN].z TEMP
}
enda
						
                                                 
						
                                                 Actually I think I'll take a short break from the "hard" stuff and take care of some easier sound and projectile replacements.
 Actually I think I'll take a short break from the "hard" stuff and take care of some easier sound and projectile replacements.
						
                                                This post has been edited by Mark.: 30 June 2013 - 02:27 PM
//Code for rotation sector
	ifvare active 1 { setactorvar[THISACTOR].active 0 setvar rot_moving 0 }			
	getactor[THISACTOR].ang ang
	ifvare rot_turnway 0 
	{ addvarvar ang rot_angspeed ifvarg ang 2047 setvar ang 0 } else 
	ifvare rot_turnway 1 { subvarvar ang rot_angspeed ifvarl ang 0 setvar ang 2048 }
	subvarvar rot_saveang rot_angspeed
	setactor[THISACTOR].ang ang //set rotation angle of own sectoreffector sprite. With rotate of this sprite, sector will be rotating too.
	
	
//Here I trying move a player with the sector together
	getplayer[THISACTOR].i PLAYERID
	setvarvar spriteid PLAYERID
	getactor[spriteid].sectnum se_sector
	getactor[THISACTOR].sectnum se_sect1
	ifvarvare se_sector se_sect1                 //if player in a sector
	{
		getplayer[THISACTOR].posx x2
		getplayer[THISACTOR].posx y2
		subvarvar x2 sprite[THISACTOR].x
		subvarvar y2 sprite[THISACTOR].y
		mulvarvar x2 x2
		mulvarvar y2 y2
		addvarvar x2 y2
		sqrt x2 se_dist //calculating a distance between player and point of rotate sector
			
		setvarvar x2 sprite[THISACTOR].x
		addvarvar x2 se_dist
		rotatepoint sprite[THISACTOR].x sprite[THISACTOR].y x2 sprite[THISACTOR].y ang x y
		setplayer[THISACTOR].posx x
		setplayer[THISACTOR].posy y //set coodinates of player after rotation
	}
This post has been edited by M210: 06 July 2013 - 12:19 AM
Quote
This post has been edited by M210: 06 July 2013 - 02:28 AM
 darkcaleb, on 06 July 2013 - 02:35 PM, said:
darkcaleb, on 06 July 2013 - 02:35 PM, said:
