Thank you! Works like a charm on game_start

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu cEgo.SetIdleView(2, 0);
Quote from: ClickClickClick on Sun 22/10/2017 16:47:23
It would help if you told us what kind of game this is for.
// Also works when game is blocked
function repeatedly_execute_always()
{
cmbHumanHotspot_OnClick(GUIControl *control, MouseButton button);
uiMainInventory_OnClick(GUIControl *control, MouseButton button);
uiCombatTest_OnClick(GUIControl *control, MouseButton button);
uiConsoleEntry_OnActivate(GUIControl *control);
uiEmergency_OnClick(GUIControl *control, MouseButton button);
keyLinearBlock();
keyCodes();
uiECS.Text = String.Format("%d", ecs);
}
GlobalScript.asc(19): Error (line 19): Parse error in expr near 'MouseButton'
function cmbHumanHotspot_OnClick(GUIControl *control, MouseButton button)
{
if (mouse.Mode == eModeUseinv) {
cmbHandler();
}
}
function keyLinearBlock (){
////////////////////// DISABLE LINEAR MOVEMENT //////////////////////
int old_mx, old_my;
void handleInput() {
int mx = IsKeyPressed(eKeyD) - IsKeyPressed(eKeyA); // only A => -1, A & D => 0, only D => 1
int my = IsKeyPressed(eKeyS) - IsKeyPressed(eKeyW);
if (mx * my != 0) return; // only allow either A/D or W/S
// rotate by 45°, stretch to 2:1
int tmx = (mx + my) * 2;
int tmy = -mx + my;
// player is still holding down same key as last frame, check for end of walkable area / do nothing
if (mx == old_mx && my == old_my) {
int a = GetWalkableAreaAt(player.x + player.WalkSpeedX * tmx / 2, player.y + player.WalkSpeedX * tmy / 4);
if (a == 0) {
player.StopMoving();
player.PlaceOnWalkableArea();
}
return;
}
// player picked new direction or released movement key
player.StopMoving();
player.Walk(player.x + tmx * 1000, player.y + tmy * 1000, eNoBlock, eAnywhere);
old_mx = mx;
old_my = my;
}
function abs(int a) {
if (a>=0) return a;
return -a;
}
function sgn(int a) {
if (a>0) return 1;
if (a<0) return -1;
return 0;
}
}
function variableChecker() {
export variableChecker;
function uiMainInventory_OnClick(GUIControl *control, MouseButton button)
{
Quote from: eri0o on Wed 18/10/2017 01:12:33
Wyz! The d-pad (POV) in my wired Xbox360 joystick doesn't work. Do you have any idea why?
Is there any possibility of releasing the joystick plugin source? I would like to play with maybe porting it to Linux.
if (keycode == eKeyS && keycode == eKeyS && player.Moving) player.Loop = 4;
if (keycode == eKeyW && keycode == eKeyD && player.Moving) player.Loop = 5;
if (keycode == eKeyS && keycode == eKeyA && player.Moving) player.Loop = 6;
if (keycode == eKeyW && keycode == eKeyA && player.Moving) player.Loop = 7;
Quote from: ClickClickClick on Mon 10/07/2017 14:21:14Quote from: Mandle on Mon 10/07/2017 14:18:26This, more or less. Needs rivers. And maybe hints that the landscape isn't completely flat.
Looks awesome, but a little bare. Maybe add some forests etc. like in the classic Lord Of The Rings maps Tolkien drew for his books?
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.087 seconds with 14 queries.